Archived

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

CodeMaster000

WTF C++ Problem

Recommended Posts

CodeMaster000    122
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
CodeMaster000    122
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
TheOne1    156
hmmm it worked when i compiled it. maybe something wrong with your configuration?
edit: oh ok.

[edited by - TheOne1 on August 8, 2003 2:59:13 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
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   
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
SoulSkorpion    238
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
sSimontis    100
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
Ready4Dis    180
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