VC大神帮我!这个是错在哪里了???
errorC2039:'Append':isnotamemberof'CString'seedeclarationof'CString'代码是:voidCMyDlg::O...
error C2039: 'Append' : is not a member of 'CString'
see declaration of 'CString'
代码是:
void CMyDlg::OnButton3()
{
static char BASED_CODE szFilter[] = "全部文件 (*.*)|*.*||";
CFileDialog filedlg(
TRUE,NULL,NULL,
OFN_EXPLORER,
szFilter);
if(filedlg.DoModal()==IDOK)
{
SetDlgItemText(IDC_EDIT3,filedlg.GetPathName());
CStdioFile file;
file.Open(_T(m_laizi), CFile::modeRead);
CString strLine(_T(""));
CString strText(_T(""));
while(file.ReadString(strLine))
{
strText.Append(strLine);
}
file.Close();
SetDlgItemText(IDC_EDIT2, strText);
}
} 展开
see declaration of 'CString'
代码是:
void CMyDlg::OnButton3()
{
static char BASED_CODE szFilter[] = "全部文件 (*.*)|*.*||";
CFileDialog filedlg(
TRUE,NULL,NULL,
OFN_EXPLORER,
szFilter);
if(filedlg.DoModal()==IDOK)
{
SetDlgItemText(IDC_EDIT3,filedlg.GetPathName());
CStdioFile file;
file.Open(_T(m_laizi), CFile::modeRead);
CString strLine(_T(""));
CString strText(_T(""));
while(file.ReadString(strLine))
{
strText.Append(strLine);
}
file.Close();
SetDlgItemText(IDC_EDIT2, strText);
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询