宏开关程序简单试例:
#include <stdio.h>
#define __DEBUG__
#ifdef __DEBUG__
#define DEBUG(...) printf(__VA_ARGS__)
#else
#define DEBUG(...)
#endif
int main()
{
char str[]="Hello World";
DEBUG("A ha, check me: %s",str);
return 0;
}