Quote:
|
Originally Posted by gamehead200
Valmont, I understand what you mean when you say not to use the while( !in_file.eof() ) loop, however, why do you use the while( in_file >> word ) instead? Doesn't this just read the word from the file in a loop?
|
No, because at each read, an internal pointer is moved up with one. So the next time the next item is read if exists.
Eacht time a valid item is read, a value that can be interpreted as "true" returns to the while statement.