Article ID: 146445 - Last Review: July 5, 2005 - Revision: 1.1 PRB: istream::seekg() Does Not Reset EOF StateThis article was previously published under Q146445 On This PageSYMPTOMS
The istream::seekg() function does not reset the EOF (end of file) state
when the stream pointer is already at EOF.
RESOLUTION
To work around this problem, call ios::clear() for the stream before
calling istream::seekg().
STATUS
This behavior is by design.
MORE INFORMATION
You don't need to call clear(), if the stream pointer is not already
at EOF.
Sample CodeAPPLIES TO
| Article Translations
|
Back to the top
