General C++ Programming - June 2009 (Page 5)

error: variable has initializer and is incomplete
 
I just started to try and write a matrix class library and ran into a compiler error that I don't understand. So far I have two files for the library, one that...
[2 replies] Last: That fixed the problem, thanks (by smilodon)
C++,Macro Problem
 
I've written below simple code.Actually need to do that the value which is given by an user that will use as macro and macro value will automatically initialyz...
[6 replies] Last: Hi my friends helios,I mostly appreciate with your suggestion.I agree ... (by sdmahapatra)
by NGen
Unresolved External Symbol
 
I'm getting 4 unresolved external symbol errors when I compile my code, but I don't know what's going on! All of the errors are pointing to 4 static variables w...
[2 replies] Last: I tried it with first_slot, and it worked! Thanks! (by NGen)
error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double'
 
I am facing an error pls anyone help me to solve this problem. Thanks #include<iostream> #include<cmath> #include<algorithm> using namespace std; // y...
[3 replies] Last: I've written below simple code.Actually need to do that the value whi... (by sdmahapatra)
finding following random numbers in c++
 
Hi, I have an assignment on c++, there are 1000 random numbers given, information says these numbers are generated by a mixed function as rand() of C++. So, w...
[10 replies] Last: The original says "sistema mixto", which can alternatively be translat... (by helios)
vector assignment operator
 
Hi I am trying to use the vector of objects and assign a value to the vector using '=' operator as follows vector<Panel> panelArray; panelArray = Panel(x,...
[4 replies] Last: Give us time plzkthx. This is a messageboard where people pop in and ... (by Disch)
problem with vectors
 
Hi I am trying to use the vector of objects and assign a value to the vector using '=' operator as follows vector<Panel> panelArray; panelArray = Panel(x,...
[1 reply] : You already have a thread here: http://cplusplus.com/forum/general/... (by Disch)
by Oromis
Use enumeration for index
 
Is it legal to use an enumeration as index for eg a vector? You're using the integer value of the enum, I've read to avoid that. But it's a lot easier then defi...
[5 replies] Last: Oke, thanks. (by Oromis)
#define and typedef
 
As I've come to realize, I find the two more often than usual lately: #define BOB BOB_struct typedef BOB_struct BOB; This performs the exact same...
[10 replies] Last: But what if you want to assign a uint32_t to a ulong? The two types ar... (by helios)
binding to a parameter
 
What does the term "binding to a parameter" mean? What happens in the background? For eg. During function call with a type mismatch a temp object is created ...
[2 replies] Last: That helps. Thanks! (by n4nature)
split string...
 
I'd like to get some text from a string. Source Code : char str = "@KEC:80:DET:90:"; char *test[sizeof(strtok(str, ":"))]; if(sizeof(test) > 0) { tes...
[1 reply] : http://www.cplusplus.com/forum/articles/9645/ (by hamsterman)
by divya
Constructor
 
I have read some where that when we use a parameterized constructor it is a must to define a default constructor explicitly. Is this true??? Thanks in adva...
[8 replies] Last: The compiler provides a default constructor ONLY if you do not define ... (by jsmith)
by gjj391
Mac OSX C++ compiling errors
 
Hello yall, I am fairly new to C/C++ and have been compiling my work on Windows thus far, but I am using a Mac now but I cant seem to get even the simplest code...
[3 replies] Last: Thanks. Don't Hate :-) (by gjj391)
How to maintain sessions with C++ CGI code?
 
There is a cgi code written in C++. Currently there is no session management done in the web pages. There is a need to provide sessions in the web pages so that...
[no replies]
by kayo
again, "was not declared in this scope"
 
I stuck with these errors,and I really hope someone could help me. (I don't understand why MTPREDICATE_CLASS is ok, and MTPREDICATE_AND_CLASS, MTPREDICATE_OR_C...
[7 replies] Last: @Grey Wolf: thanks. I've tried it, but it still didn't work. The codes... (by kayo)
Data storage
 
OK, long story short I'm programming a calculator for Chemistry uses and i need to know the best way of storing mass amounts of data. The data being stored is t...
[3 replies] Last: Ah, like a database. That would probably be easiest. You can look into... (by closed account S6k9GNh0)
by Calwoz
Class array
 
Im trying to set an array of 5 elements each with a class in, im also trying to use a construct with each one, but im a bit phased with how, ive been trying thi...
[7 replies] Last: ah well thanks for the help guys! appreciated :D (by Calwoz)
pointer to pointer - const correctness
 
Hi, I would like to know why the initialization of p2 is illegal (see code below), I have the given comments: #include <iostream> using namespace st...
[3 replies] Last: The below mentioned was explained to me by someone a few min back, I t... (by muthuveerappan)
Polymorphism question
 
I have some operator <</>> overloads like this: class player : public animate { //... friend ostream& operator << (ostream&, const player&); frie...
[2 replies] Last: Nvm, it was a (another) dumb mistake I made...I put it in a position w... (by firedraco)
Filenames and Unicode
 
Most modern applications use a GUI which deals with Unicode strings represented either as wchar_t * or std::wstring or some GUI specific equivalent, such as the...
[10 replies] Last: I guess we'll have to agree to disagree. I don't agree with that. :-)... (by helios)
June 2009 Pages: 1... 34567... 13
  Archived months: [may2009] [jul2009]

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