64,282
社区成员
发帖
与我相关
我的任务
分享
// jernymy test
#include <stdio.h>
#include <stdarg.h>
#define MAX_BUF_SIZE 2048
void TestPnt(const char *pszFmt, ...)
{
va_list ptList;
char achBuf[MAX_BUF_SIZE] = {0};
int nBufLen;
va_start(ptList, pszFmt);
nBufLen = vsprintf(achBuf, pszFmt, ptList);
va_end(ptList);
// OutputDebugString(achBuf);
printf(achBuf);
printf("%s", achBuf);
}
int main(void)
{
int nIdx = 10;
TestPnt("nIdx:%d\n", nIdx);
return 0;
}
CString strDebug;
strDebug.Format(L"...", ...);
OutputDebugString(strDebug);