I am using VC2010. I defined FALSE to be false using
#define FALSE=false
and then I tried to use it as follows
bool *bPtr;
if(some condition)
*bPtr=FALSE;
the compiler flags FALSE and says “Expected an expression”.
I used false instead of the defined ‘FALSE’ and it accepts it.
I am wondering as what could be the problem.
You might tell me not to define and so not to use FALSE. well, I am not using it.
I just want to know the problem.
You shouldn’t put
=in the definition statement:The problem is that the preprocessor will replace every
FALSEwith=false, so you will have:And this is not legal as you see.