Beginners - December 2011 (Page 6)

static functions can only access static variables ?
 
i read static functions can only access static variables and not normal variables #include <iostream> using namespace std; class Dealer { private: ...
[3 replies] Last: I thinks that their use also has to do with the fact that they are sta... (by eypros)
build trouble with simple xerces code
 
Hi folks, I'm new to C++, although quite proficient in MATLAB. Gone through tutorials, done hello world and variations... But.. I'm trying to write some c...
[3 replies] Last: Those look like link errors. I don't use NetBeans but there must be so... (by Galik)
New C++, need help with program
 
Hello everybody, I'm new to C++. I'm learning by myself. I've written the program below, and everything works, but now I want to add more to the program. I n...
[5 replies] Last: I think in all modern compiler float s are deprecated in favor of do... (by eypros)
Merry Christmas, friends!
 
This topic has nothing to do with programming or C++.I've created it because we should forget for a moment this things that we do all the time and to think more...
[6 replies] Last: A very brief statement, :P however never less than its meaning it repr... (by nickoolsayz)
unique implementation
 
http://www.cplusplus.com/reference/algorithm/unique/ The behavior of this function template is equivalent to: template <class ForwardIterator> For...
[5 replies] Last: Then every assignment would require an additional comparison for equal... (by Athar)
Solving the "Pancake Glutton" problem.
 
I did my best to try and solve this problem so i thought maybe some more experienced people would have some tips to simplify and or improve my solution to it: ...
[7 replies] Last: Mmmkay... simple enough. Lets begin with your second for loop. I s... (by qczackf)
probblem in operator overloading(>>&<<) in c++
 
#include<conio.h> #include<stdio.h> struct input { void operator>>(int&x) { scanf("%d",&x); return; } }; struct output { void operator<<(char...
[5 replies] Last: input& operator>>(int &x){ //... return *this; } (by ne555)
by Nati
Something i cannot get...
 
Hi, Can someone explain to me the following error: "no matching function for call to 'Student::Student(Student)'" i got the message only in the return statem...
[4 replies] Last: Thank you very much! (by Nati)
Unable to input in cin when using sstream
 
There is no error code, that's the problem, when I use the code below. Everything worked fine until I added the code that is between the @@@@@@@@@@ #include...
[1 reply] : This is a common problem. cin >> i only reads the characters it needs.... (by hamsterman)
C++
 
I know everything in C++ language tutorial and I am good enough at coding that I only review for reference. I want to learn more so I will be able to make meani...
[1 reply] : Well, if you truly know the tutorials that well, your pretty much ther... (by ModShop)
input and output data file names
 
I have task in c++ to do but i dont understand what it wants.It says "the program output and input data files name can be embedded in the program source file or...
[4 replies] Last: Using std::strings with std::fstream for reference (Read filename in f... (by wolfgang)
create rectangle using single for loop
 
I am trying to create a rectangle using only one for loop but I am not sure how to go about this. The user is to enter a width and height and the output is a re...
[7 replies] Last: Should be getting credit and getting credit are sometimes two differen... (by Athar)
Counting number of entries in a txt file
 
So I have data that is being output to a txt file, with each piece of data being tabulated line by line (Each line has only 1 data entry). I'm trying to store ...
[no replies]
WM_GETTEXT
 
I'm using EnumChildWindwos to find the control I'm looking for, then read the caption of the control using WM_GETTEXT. BOOL CALLBACK EnumChildProc(HWND hwnd...
[2 replies] Last: I think sloppy9 pretty much nailed this because WM_GETTEXT is below WM... (by webJose)
Problem with input from file
 
Hi all, I have a problem with getting data from the txt file outside, I can't get the data. The compiler say there is no error. Here is my code Functi...
[6 replies] Last: One of my friends show me the problem, thanks you guys anyway. You are... (by teaflavor)
Need Help on for loop
 
Hello everyone. I am wondering if this is correct because each time i run my program it gives me 50050 on the console. #include <iostream> using namespace...
[7 replies] Last: Yes, thank you. Now i understand. (by Random94)
Cannot cast void pointer returned by calloc
 
i really dont know whats going on here im trying the convert the void pointer that is returned by the calloc function if the memory allocation is succesfull to ...
[3 replies] Last: This is a good one. In fact, the problem isn't "Cannot cast void poin... (by h9uest)
There's something wrong with this code
 
const int ROWS = 2; const int COLUMNS = 3; char board = { {’O’, ’X’, ’O’}, {’ ’, ’X’, ’X’} }; This is an exercise from a book,...
[2 replies] Last: Thanks whitenite. (by Integrater)
Am I explaining and doing this correctly?
 
Am I explaining and doing this correctly? Also can someone give me more tips when commenting like when to comment and when no to? I don't know but sometime...
[1 reply] : Comment what you don't find obvious. Your comments before loops are ok... (by hamsterman)
random numbers problem
 
Hi guys. I'm trying to get a specific random number. Example, the number of 25, 30, 35, 40, 45, 50, need to be pick randomly and assign to x. I have made the co...
[5 replies] Last: Basically, you'd want multiples of 5, between 50 and 100, right... So ... (by Caprico)
December 2011 Pages: 1... 45678... 47
  Archived months: [nov2011] [jan2012]

This is an archived page. To post a new message, go to the current page.