CString sFilePath = "F:\101\2009\4\3\21_5_45.wav";
CFile myFile;
CFileException feFileException;
if(!myFile.Open(sFilePath, CFile::modeRead | CFile::typeBinary, &feFileException));
{
int nError = feFileException.m_cause;
return false;
}wav文件在给定的路径下保存,可是nError = 2,即CFileException::fileNotFound 
大家帮忙解决

解决方案 »

  1.   

    CString helpdoc = "c:\\123\\234.doc" ;
       看看我的程序就知道那里错误了吧。改成下面的格式就好了。你可以试试吧。CString sFilePath = "F:\\101\\2009\\4\\3\\21_5_45.wav"; 
      

  2.   

    我改动CString sFilePath = "G:纯.jpg"; 运行你的这段程序后没出错啊,你再换换其他文件试试
      

  3.   

    在构造字符串的时候,【\】需要这样写:【\\】
    所以,要加双斜杠。
    CString str = _T("f:\\test\\123.wma");
      

  4.   

    CString sFilePath = "F:\\101\\2009\\4\\3\\21_5_45.wav";