摘要: VC6 不支持C99 没有可变长的宏参数 __VA_ARGS__可以使用下面的Walkaround来解决采用的方法比较巧妙,使用匿名对象和重载()操作符来达到和TRACE函数相同的效果,同时还能正确打印文件和行号。#include <stdio.h>#include <windows.h>#define _DEBUG_BUF_SIZE_ 2048static char _buf_[_DEBUG_BUF_SIZE_];class trace_impl{public: trace_impl(const char* file,size_t line):file_(file), 阅读全文
posted @ 2011-02-15 22:30 OYJJ 阅读(1080) 评论(0) 推荐(0) 编辑