On Fri, Oct 10, 2008 at 2:22 PM, Jos Timanta Tarigan <[EMAIL PROTECTED]> wrote: > Yes, but Im confused about the idea of f.eof(). For example I put 6 element > to a file. Ive read > the 6th element. If i test f.eof(), will it return false, or do I have to > read it one more time, and > then test f.eof()?
The latter. eof() tells you when you've 'gone past' the end of file, not when you're about to (it doesn't do any 'lookahead' - indeed it can't since it needs to work with things like stdin/cin.) -- PJH http://shabbleland.myminicity.com/ind
