首页 > 其他 > 详细

Debug coding

时间:2014-10-14 11:03:39      阅读:376      评论:0      收藏:0      [点我收藏+]
#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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!