有下面的代码
CFile file;
file.Open(fileName,CFile::modeRead);
CArchive ar(&file,CArchive::load);
CString note;
ar>>m_note;
当运行到 ar>>m_note; 时就弹出“试图越过其尾端对一未命名文件进行读写”
怎么回事,郁闷!
CFile file;
file.Open(fileName,CFile::modeRead);
CArchive ar(&file,CArchive::load);
CString note;
ar>>m_note;
当运行到 ar>>m_note; 时就弹出“试图越过其尾端对一未命名文件进行读写”
怎么回事,郁闷!
CFileDialog dg(1);
if(dg.DoModal()==IDOK)
{
CString fileName=dg.GetPathName();
CFile file;
file.Open(fileName,CFile::modeRead);
CArchive ar(&file,CArchive::load);
CString note;
ar>>note;
}自己去试一试,祝你好运!
lResult = AfxGetThread()->ProcessWndProcException(e, &pThreadState->m_lastSentMsg);
TRACE1("Warning: Uncaught exception in WindowProc (returning %ld).\n",lResult);
DELETE_EXCEPTION(e);自己好好去调试一下吧。
whw即why,有点晕了,呵呵