[code小心得]程式除錯和gcc 巨集使用技巧 part 2

#define DEBUG_OUT( fmt, args...)\ printf( "File :%s Function:%s Line:%d"fmt,) \ __FILE__, __FUNCTION__, __LINE__, ##args) #ifdef USE_DEBUG #define DEBUG_OUT( fmt, args... ) \ printf( "File:%s Function:%s Line:%d"fmt, \ __FILE__, __FUNCTION__, __LINE__,##args ) #else #define DEBUG_OUT(fmt, args... ) #endif

留言