#include <iostream>
#include <afxwin.h>
int main()
{
try
{
CFile f(_T("c:\\1.txt"), CFile::modeWrite);
}
catch (CFileException* e)
{
if (e->m_cause==CFileException::fileNotFound)
{
AfxMessageBox(_T("File not found"));
}
}
}
c++ 错误处理
猜你喜欢
转载自blog.csdn.net/dxm809/article/details/114776324
今日推荐
周排行