When I put in somthing wrong VC++ .NET ERRORS tell me to put the semi-colons in... thats why I say it haunted
I have a new error
code
voidadd(int x,int y);
{
;std::cout<<"x+y";std::endl
}
error
c:\Documents and Settings\Randle\My Documents\Visual Studio Projects\done\over.cpp(4): error C2447: ''{'' : missing function header (old-style formal list?)
thx for not flaming me
stupid error;is vc++ haunted?..?
OK its been said 1000000000000000000000 times YOU PUT SEMICOLONS IN THE WRONG PLACE!
[Mercury Software] [Google!] [ Look I DONT Follow Trends ]
[edited by - DerAngeD on January 17, 2004 1:44:52 PM]
//notice no space therevoid add(int x,int y) //no semicolon after void{//no semicolon BEFORE funtionsstd::cout<<x+y<<std::endl;}
[Mercury Software] [Google!] [ Look I DONT Follow Trends ]
[edited by - DerAngeD on January 17, 2004 1:44:52 PM]
Semi-colons do not go at the end of a function header, and do go at the ends of statements:
If you still don''t get it, you really need to buy and read a book on C++...
-Auron
void add (int blah) // No semi-colon there!{ std::cout << blah << std::endl; // semi-colon there}
If you still don''t get it, you really need to buy and read a book on C++...
-Auron
if i do that it gives me
c:\Documents and Settings\Randle\My Documents\Visual Studio Projects\done\over.cpp(4): error C2447: ''{'' : missing function header (old-style formal list?)
again
c:\Documents and Settings\Randle\My Documents\Visual Studio Projects\done\over.cpp(4): error C2447: ''{'' : missing function header (old-style formal list?)
again
Let''s face it. If you''re not just trolling, you need to re-learn C++ from scratch, because right now you have absolutely no idea what you''re doing. Get a book, because there''s no way you can learn C++ by asking us to fix your horribly mangled code again and again.
Click here.
PS: When it says that you need to put semicolons, it can (especially in this program...) mean that that code shouldn't be there at all!
PPS: I don't mean to flame, just trying to make the link stand out more than the rest of this mumble-jumble (no offense).
[edited by - jtmerchant on January 17, 2004 2:34:32 PM]
PS: When it says that you need to put semicolons, it can (especially in this program...) mean that that code shouldn't be there at all!
PPS: I don't mean to flame, just trying to make the link stand out more than the rest of this mumble-jumble (no offense).
[edited by - jtmerchant on January 17, 2004 2:34:32 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement