首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

CFile:open打开资料时,出现access to an unnamed file was denied

2013-03-12 
CFile::open打开文件时,出现access to an unnamed file was denied定义了一个CFile m_file对象,使用m_file

CFile::open打开文件时,出现access to an unnamed file was denied
定义了一个CFile m_file对象,使用m_file.Open(m_PathName,CFile::modeRead || CFile::typeBinary),打开一个文件,然后使用m_file.Read(pData,FileLength);将数据读入一个char *的栈中,但是此时出现了access to an unnamed file was denied,这是为什么呢?!
[解决办法]
应该是m_PathName中的数据不对。

热点排行