Click to See Complete Forum and Search --> : CFileException


timber
May 6th, 1999, 05:29 PM
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

Harvey Hawes
May 6th, 1999, 06:30 PM
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