Archived

This topic is now archived and is closed to further replies.

WTF C++ Problem

This topic is 5245 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

lol this is hilarious. I have no idea what is with my debugger. All of a sudden it goes wakko over a for statement. ok here my code:
for (loop=0; loop < 10; loop++)
{

}
I commented out everything but what you see and it still gives me this errors: Compiling... Game.cpp D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing ';' before 'for' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing ')' before ';' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing ';' before '<' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2501: 'loop' : missing storage-class or type specifiers D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing ';' before '<' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing ';' before '++' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2501: 'loop' : missing storage-class or type specifiers D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2086: 'loop' : redefinition D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing ';' before '++' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2059: syntax error : ')' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(14) : error C2143: syntax error : missing ';' before '{' D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(14) : error C2447: missing function header (old-style formal list?) Error executing cl.exe. I don't get it??? [edited by - codemaster000 on August 8, 2003 2:46:12 AM]

Share this post


Link to post
Share on other sites
Same error message.. I tried that befor BTW.


Compiling...
Game.cpp
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing '';'' before ''for''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing '')'' before '';''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing '';'' before ''<''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2501: ''loop'' : missing storage-class or type specifiers
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing '';'' before ''<''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing '';'' before ''++''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2501: ''loop'' : missing storage-class or type specifiers
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2086: ''loop'' : redefinition
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2143: syntax error : missing '';'' before ''++''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(13) : error C2059: syntax error : '')''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(14) : error C2143: syntax error : missing '';'' before ''{''
D:\PROGRAMMING\C++\OPENGL\Jaguar\Game.cpp(14) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.

Game.obj - 12 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
And exactly how many seconds did you look at the code before posting here?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Don''t worry about it shix like that happens drink a lot of coffee and you''ll be fine.

Share this post


Link to post
Share on other sites
quote:
Original post by CodeMaster000
lol I found the problem... i though it might be this. I just forgot to put it into any kind of function. So it was sitting all along. UH DUH!! Lol but thank for your help!




First time I''ve heard of anyone doing that before

Share this post


Link to post
Share on other sites
I forgot to put 100 or more lines of code in OpenGL once. I decalred the function, but didn''t write it.

Scott Simontis
If it wasn''t for C, we''d be using BASI, PASAL and OBOL

Share this post


Link to post
Share on other sites
quote:
Original post by Village Specialton
Scott Simontis
If it wasn''t for C, we''d be using BASI, PASAL and OBOL


Yes, but we''d still have good old Assembly .

Share this post


Link to post
Share on other sites