C99中關於編譯器內置宏的信息
. be redefined implementor must understand; --conforming. It defined as having the value, _ _STDC_IEC_559_COMPLEX_ _.
基本上,我們會使用到的有:
__DATE__ 編譯日期
__TIME__ 編譯時間
__FILE__ 編譯文件路徑
__LINE__ 當前源碼所在行號
C99中關於不定參數宏定義的支持
. For example, there textual rather than run-\ dprintf( If DEBUG , this calls fprintf, but first catenating must therefore be a simple \
調試宏定義樣例:
#include
#define __DEBUG__
#ifdef __DEBUG__
#define DEBUG(format,...) printf("File: "__FILE__", Line: %05d: "format"/n", __LINE__, ##__VA_ARGS__)
#else
#define DEBUG(format,...)
#endif
參考:http://www.cnblogs.com/lixiaohui-ambition/archive/2012/08/21/2649052.html
完