#elif没有括号 [英] #elif defined without parentheses
本文介绍了#elif没有括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用VS2005与BLAH_BLAH定义的下列预处理条件是假的:
Using VS2005 with BLAH_BLAH defined the following preprocessor conditional is false:
#elif defined BLAH_BLAH
但如果我将其更改为
#elif defined(BLAH_BLAH)
这是真的。
为什么括号在这里有所不同?
Why do the parentheses make a difference here?
推荐答案
头文件是用linux编辑器创建的,通过添加现有添加到项目中,在VS编辑器中创建文件后,它的计算结果为true。必须是LF / CR问题?
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?
这篇关于#elif没有括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文