小编Hob*_*_io的帖子

比较 C 中两个未定义的符号

我没有定义符号 SYMBOL1 和 SYMBOL2,当我看到以下代码中调用 printf 时,我感到很惊讶:

#include <stdio.h> 
int main()
{
#if (SYMBOL1==SYMBOL2)
    printf("Hello World");
#endif
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

您能解释一下原因吗?有什么参考标准吗?

c c-preprocessor

0
推荐指数
1
解决办法
206
查看次数

标签 统计

c ×1

c-preprocessor ×1