C And C++ - Trouble With Eof() Function | DreamInCode.net - 0 views
-
Nelly Cardinale on 08 Mar 09Yes that's right. EOF is a flag which is set after a failed read attempt to read past the end of a file. the "While not EOF" idiom doesn't quite work in C or C++ - Instead its usually suggested that you use the idiom of "read while there is data to be read"; for example, while ( getline(file, my_string) ) 0r while( file >> x ) Author thanked 50 times