标签:style blog http io ar sp on cti log
作者:刘昊昱
博客:http://blog.csdn.net/liuhaoyutz
#include <stdio.h> #define HAOYU_DEBUG_TYPE #ifdef HAOYU_DEBUG_TYPE #define HAOYU_DEBUG(...) do { printf("\n[HAOYU_DEBUG] ------------------ in %s:%d %s()------------------\n", __FILE__, __LINE__, __FUNCTION__); printf(__VA_ARGS__); printf("\n\n"); } while(0); #else #define HAOYU_DEBUG(...) do {} while(0) #endif int main(int argc, char **argv) { int i = 0; printf("hellodebug!\n"); HAOYU_DEBUG("debug message, i = %d", i); return 0; }
标签:style blog http io ar sp on cti log
原文地址:http://blog.csdn.net/liuhaoyutz/article/details/40370755