自己想想啥 這也不是什么難題^_^
#ifdef DEBUG_ON
#define DEBUG(fmt, args...) fprintf(stderr, fmt, ##args)
#else
#define DEBUG(fmt, args...)
#endif
#ifdef DEBUG_ON
#define TRACE() fprintf(stderr,"%s\t%s\t%d\t%s\n",__FILE__,__FUNCTION__,__LINE__,__TIME__)
#else
#define TRACE()
#endif
復(fù)制代碼
我這里是宏,你也可以用函數(shù)
http://bbs.chinaunix.net/thread-1551843-1-1.html
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報。