下面是我的代码
BOOL CTask3Doc::OnSaveDocument(LPCTSTR lpszPathName)
{
// TODO: 在此添加专用代码和/或调用基类
POSITION pos = this->GetFirstViewPosition();
CTask3View * p = reinterpret_cast<CTask3View *>(this->GetNextView(pos));
CStdioFile Rfile; 
Rfile.Open(lpszPathName,CFile::modeWrite);
CString temp;
for(int i=0;i<=p->m_strArray.GetSize();i++)
{
temp.Format("%s\r\n",p->m_strArray.GetAt(i));
Rfile.WriteString(temp);
}
Rfile.Close();
return CDocument::OnSaveDocument(lpszPathName);
}
代码如上,运行到Rfile.WriteString(temp);这句时就中断,求高手指教啊