用法
- #error用於生成一個編譯錯誤消息
- #error message
- message 不需要用雙引號包圍
- #error是一種預編譯器指示字
- #error可用於提示編譯條件是否滿足
實例:
#ifndef _cplusplus
#error This file should be processed with C++ compiler.
#endif
- #line用於強制指定新的行號和編譯文件名,並對源程序的代碼重新編號
- #line編譯指示字的本質是重定義_ LINE _ 和 _ FILE _
用法
#line number filename
filename可省略