编译出错求解
int i, nLineCount = m_myEdit.GetLineCount();
CString strText, strLine;
// Dump every line of text of the edit control.
for (i=0; i < nLineCount; i++)
{
// length of line i:
int len = m_myEdit.LineLength(m_myEdit.LineIndex(i));
m_myEdit.GetLine(i, strText.GetBuffer(len), len);
strText.ReleaseBuffer(len);
strLine.Format(_T("line %d: '%s'\n"), i, strText);
AFXDUMP(strLine);
}
编译时
error C2664: 'AfxDump' : cannot convert parameter 1 from 'class CString' to 'const class CObject *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.