CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CFileException

  1. #1
    Join Date
    May 1999
    Posts
    136

    CFileException

    Hi,
    The following code snippet...

    CFileException e;
    while(e!==CFileException::endOfFile)

    is suppose to test for end of file. This won't compile. Could someone tell me whats wrong with it? 'e' is suppose to be a instance of a CFileException, right? and the logical not checks for equallity to the CFileException::endOf File, right?

    Thanks
    Steve


  2. #2
    Join Date
    May 1999
    Posts
    36

    Re: CFileException

    Hi,

    Um...

    1) !== should be != (probably a typo...)

    2) "e" is the object you've created. You want to compare a member of that object to CFileException::endOfFile. Like this:


    while(e.m_cause != CFileException::endOfFile)






    Harvey Hawes

    Software Engineer
    BioScience Analysis Software Ltd.

    Masters Candidate
    Cardiovascular/Respiratory Sciences
    Faculty of Medicine
    University of Calgary
    Calgary, Alberta, Canada

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured