Skip to main content
GameDev.net gamedev.net
🔒 Locked

weird compile errors

Started by Convict@Large Apr 12, 2002 at 9:30 AM 4 replies 150+ views
Original Post
Convict@Large
Convict@Large
ok I am getting a strange compile error:
  
// check for incoming messages

while( TestAPI.PeekMessage() != BFALSE )
{
//code here

}
  
I am getting the following error messages on the first line: d:\cotdb\netapi\conmestest.cpp(101) : error C2143: syntax error : missing '')'' before '';'' d:\cotdb\netapi\conmestest.cpp(101) : error C2059: syntax error : '')'' PeekMessage should return a unsigned char and BFALSE is #def to 0 and BTRUE to 1. Any ideas anyone? The project also uses STL and someone I know said that sometimes causes weird errors but I don''t know where to even start looking for STL induced errors as I am still pretty new to it... Cheers, Convict@Large "I code therefore I am" Anon
DanielB - Slayer of Bugs
Convict@Large
Convict@Large
yes there is, how did you know that was causing it? And why does it cause the problem?

Thanks for that by the way, I would have spent ages chasing it!

Cheers,

Convict@Large

"I code therefore I am" Anon
DanielB - Slayer of Bugs
dagarach
dagarach
quote:
Original post by Convict@Large
yes there is, how did you know that was causing it? And why does it cause the problem?



# means precompiler, #define means that the #define-d token will be replaced by whatever is on the #define line after it, *Before* the compiler runs. Look:
#define D true;

if(x==D)
...
becomes
if(x==true ; )

then the compiler reads it and doesn't like it.


[edited by - dagarach on April 12, 2002 10:46:06 AM]
Convict@Large
Convict@Large
ah I get it. Thanks for explaining it to me.

Cheers,

Convict@Large

"I code therefore I am" Anon
DanielB - Slayer of Bugs

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.