~cpp
void Foo(LPCTSTR pFmt, ...)
{
int len;
va_list args;
TCHAR *pbuf;
CString str;
va_start(args, pFmt);
len = _vsctprintf(pFmt, args) + 1;
pbuf = new TCHAR[len];
_vstprintf(pbuf, pFmt, args);
AfxMessageBox(str);
SAFEDELETE(pbuf);
}
~cpp
CString str;
str.Format(_T("a : %d, b : %d, c: %d"), a, b, c);
AfxMessageBox(str);
이랬지만,~cpp
VAMessageBox(_T("a : %d, b : %d, c: %d"), a, b, c); // variant argument(?)의 약자같다.