seekg and eof
Mike Harrold
mharrold@cas.org
Fri Dec 31 20:54:00 GMT 1999
>
> Hello,
>
> I don't know whether it is a bug or simply a mistake of me. When I have
> an ifstream and read it until the end the eof-flag is set. When I want
> to change the fileposition with seekg() this flag isn't reset. That
> means I get the right position with tellg() but I cannot read any more
> bytes with get(char).
> Are there any other possibilities to change the fileposition of an
> ifstream?
You have to clear the flag manually.
e.g.
fl.clear();
fl.seekg(0);
Regards,
/Mike
More information about the Gcc-bugs
mailing list