调试开关

#include <stdio.h> #ifdef PREDEBUG #define DEBUG(format, ...) printf(format,/ ##__VA_ARGS__) #else #define DEBUG(format, ...) do{}while(0) #endif int main(int argc, char *argv[]) { DEBUG("info /n"); return 0; } 

 

编译时可以加上-D PREDEBUG来控制调试开关。

你可能感兴趣的:(调试开关)