#elif defined without parentheses
11,395
Solution 1
The header file was created with a linux editor and added to the project with "Add Existing", after creating the file in the VS editor it evaluates to true. Must be a LF/CR issue?
Solution 2
It shouldn't make any difference, unless BLAH_BLAH is defined as something funny.
Author by
insipid
Updated on June 04, 2022Comments
-
insipid almost 2 years
Using VS2005 with BLAH_BLAH defined the following preprocessor conditional is false:
#elif defined BLAH_BLAH
but if I change it to
#elif defined(BLAH_BLAH)
it is true.
Why do the parentheses make a difference here?