Reputation: 11452
I have an iVar named,
int DATA_IN_TRANSIT;
and I have defined several macros, e.g.
#define PLACES 0;
When I do something like the following,
if(DATA_IN_TRANSIT == PLACES)
{
NSLog(@"Make LLVM Dance!");
}
I get a compiler error (expression expected
) in the line if(DATA_IN_TRANSIT == PLACES)
I don't know why it's giving me an error? Am I doing something naive?
Upvotes: 2
Views: 2761
Reputation: 7257
#define PLACES 0
but without ';'
otherwise you'll get
if(DATA_IN_TRANSIT == 0;)
{
NSLog(@"Make LLVM Dance!");
}
Upvotes: 9