不解:TRACE里面也有BUG???
////1 my call
//1 read string
CString cstrfileContent;
ifstream in("hhh.h");
char LineString[256];
while(in)
{
in.getline(LineString,sizeof(LineString));
cstrfileContent+=LineString;
}
in.close();
TRACE("%s",cstrfileContent);//???-->>> call here
////2 trace into
void AFX_CDECL AfxTrace(LPCTSTR lpszFormat, ...)
{
#ifdef _DEBUG // all AfxTrace output is controlled by afxTraceEnabled
if (!afxTraceEnabled)
return;
#endif
va_list args;
va_start(args, lpszFormat);
int nBuf;
TCHAR szBuffer[512];
nBuf = _vsntprintf(szBuffer, _countof(szBuffer), lpszFormat, args);
// was there an error? was the expanded string too long?
ASSERT(nBuf >= 0); //????---->>>>here bBuf=-1
if ((afxTraceFlags & traceMultiApp) && (AfxGetApp() != NULL))
afxDump << AfxGetApp()->m_pszExeName << ": ";
afxDump << szBuffer;
va_end(args);
}
#endif //_DEBUG