OutputDebugString实现变参输入

void OutputDebugString(const char *format, ...)
{
va_list args;
#define MAXREPORTMESSAGESIZE 513
char    message [MAXREPORTMESSAGESIZE];


va_start(args, format);
_vsnprintf(message, MAXREPORTMESSAGESIZE, format, args);
va_end(args);
message[MAXREPORTMESSAGESIZE - 1] = '\0';


OutputDebugString(message);
}

你可能感兴趣的:(OutputDebugString实现变参输入)