判断文件指针吗?

解决方案 »

  1.   

    ReadString 方法返回 FALSE 即文件尾
      

  2.   

    A pointer to the buffer containing the text data. NULL if end-of-file was reached without reading any data; or if boolean, FALSE if end-of-file was reached without reading any data.
      

  3.   

    CStdioFile f;
    ...
    if (!f.ReadString(str))
       MessageBox("End of File!");
      

  4.   

    回复人: lonely001(独行客) ReadString 方法返回 FALSE 即文件尾----------------------------------------------这是对的,判断这个就行了
      

  5.   

    if(file.GetPosition()>=file.GetLength()){file.Close();break;}