среда, 25 марта 2009 г.

While not eof

// Read until the end of the file
// The last loading line may be skipped if it has no <cr><lf> at the end
while(!std::getline(inFile, s).eof())
...

This version is better. It will read all lines and the last one also.
// Read until the end of the file
while(std::getline(inFile, s))
...

Комментариев нет:

Отправить комментарий