我正在使用 VxWorks6.8 C++ 编译器编译一个相当大的项目。我收到以下警告
警告:#endif 指令末尾的额外标记
#ifndef _OM_NO_IOSTREAM
#ifdef WIN32
#ifndef USE_IOSTREAM
#define USE_IOSTREAM
#endif USE_IOSTREAM
#endif WIN32
我收到了很多这样的警告。
- Why i am getting these warnings and from C++ standard point of view?
- What is the good reason why compiler is warning for this?
- What is the best way to fix this?
谢谢
最佳答案
应该是:
#endif // USE_IOSTREAM
#endif // WIN32
endif
不接受任何参数。放置此类评论只是为了便于阅读
编辑:
你错过了最后关闭 #endif//_OM_NO_IOSTREAM
关于c++ - 警告 : extra tokens at end of#endif directive,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7467931/