码迷,mamicode.com
首页 > 其他好文 > 详细

Debug coding

时间:2014-10-14 12:45:48      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   ar   for   sp   art   log   ef   

#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

Debug coding

标签:blog   http   io   ar   for   sp   art   log   ef   

原文地址:http://my.oschina.net/mjRao/blog/330370

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!