尝试创建一个宏,可以在定义DEBUG时用于打印调试消息,如下面的伪代码:
#define DEBUG 1 #define debug_print(args ...) if (DEBUG) fprintf(stderr, args)
如何用宏实现这一目标?
c c-preprocessor
c ×1
c-preprocessor ×1