【发布时间】:2013-06-30 03:12:00
【问题描述】:
在cygwin中使用gcc和g++ 4.5.3版,我做了这个程序,发现#ifndef似乎不能正常工作。
#ifndef BLAH
#define <stdio.h>
#endif
int main(){
return 0;
}
使用#ifdef 似乎工作正常。 我得到的错误是“宏名必须是标识符”。
#ifndef 是否需要特定的东西?
【问题讨论】:
#ifndef BLAH
#define <stdio.h>
#endif
int main(){
return 0;
}
使用#ifdef 似乎工作正常。 我得到的错误是“宏名必须是标识符”。
#ifndef 是否需要特定的东西?
【问题讨论】:
#define <stdio.h>
/* ^
\
--- this should be #include
*/
【讨论】: