摘要: 内联函数形式:inline void trace(const char* format,...){ va_list ap; va_start(ap,format); int len=_vscprintf(format,ap)+1;//+1计入'/0' char *pBuf=(char*)malloc(sizeof(char)*len); vsprintf_s(pBuf,len,format,ap); va_end(ap); OutputDebugStringA(pBuf); free(pBuf);}宏形式:内联函数的形式存在缺陷,不能用来统计所在的函数和行号等更好的方法应该使用 阅读全文
posted @ 2011-02-09 21:51 OYJJ 阅读(448) 评论(0) 推荐(0) 编辑