#include <stdio.h>
#define __DEBUG__
#ifdef __DEBUG__
#define DEBUG(format,...) printf("File: "__FILE__", Line: %05d: "format"\n", __LINE__, ##__VA_ARGS__)
#else
#define DEBUG(format,...)
#endif
int main() {
char str[]="Hello World";
DEBUG("A ha, check me: %s",str);
return 0;
}
From : http://blog.csdn.net/aobai219/article/details/6092292
原文:http://my.oschina.net/mjRao/blog/330370