CStdioFile Myfile;
if(!Myfile.Open(s.filename,CFile::modeCreate|CFile::modeReadWrite|CFile::typeText))
s.filename文件名if()中是什么意思?

解决方案 »

  1.   

    Open:
    Nonzero if the open was successful; otherwise 0. The pError parameter is meaningful only if 0 is returned.
      

  2.   

    能否再讲清楚点Myfile.Open(s.filename,CFile::modeCreate|CFile::modeReadWrite|CFile::typeText)
    尤其是这
      

  3.   

    打开一个文件,
    后面那些是打开的参数,CFile::modeCreate   Directs the constructor to create a new file. If the file exists already, it is truncated to 0 length.
    如果不存在就创建,存在就把这个文件内容清空CFile::modeReadWrite   Opens the file for reading and writing
    文件可读可写CFile::typeText   Sets text mode with special processing for carriage return–linefeed pairs (used in derived classes only).
    这个文件是文本方式的
      

  4.   

    奇怪啊,楼主没有安装MSDN吗? 在VC/VC.net中,光标放到那里按下F1会吗?