IDE中debug 输出

来源:互联网 发布:意林小小姐阅读软件 编辑:程序博客网 时间:2024/06/05 04:58
在使用OutputDebugString 时不是很方便,因为只接受字符串
文章出处:http://www.flipcode.com/archives/Debug_Output.shtml// COTD Entry submitted by Zach Bonham [zbonham@flash.net]//: wrapper for logging messages to output device//:bool debugout(const char *msg, ...) {

va_list argList; char buffer[512] = { 0 };

va_start(argList, msg);

vsprintf(buffer, msg, argList);

va_end(argList);

OutputDebugString(buffer); OutputDebugString("/n");

return false;

}

原创粉丝点击