请问如何判断CArchive是否eof

解决方案 »

  1.   

    CArchive::ReadSee Also
    CArchive Overview | Class Members | Hierarchy Chart
    Reads a specified number of bytes from the archive.UINT Read(
       void* lpBuf,
       UINT nMax 
    );
    Parameters
    lpBuf 
    A pointer to a user-supplied buffer that is to receive the data read from the archive. 
    nMax 
    An unsigned integer specifying the number of bytes to be read from the archive. 
    Return Value
    An unsigned integer containing the number of bytes actually read. If the return
                                                                      ^^^^^^^^^^^^^
     value is less than the number requested, the end of file has been reached. No 
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    exception is thrown on the end-of-file condition.如果读取的数据比要求的数据少,或者没有读到数据,就是文件到结尾了。