Ben Payne wrote:
>
>
> I think the most concise, and foolproof way to do this is just:
>
> while(!infile.getline(temp1, max).eof());
>
> this is valid since getline returns a reference to the stream.
> the only downside is addition of a function call, but that's
> what it's there for.
In addition what Jim alredy had to say.
.... it is foolproof until you try to read from a file
from a floppy disk which has a demaged sector in the middle
of your file.
The getline() will fail, but not because of eof
--
Karl Heinz Buchegger