PRB: istream::seekg() Does Not Reset EOF State (146445)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q146445 SYMPTOMS
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.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbCompiler kbCPPonly kbprb KB146445 |
---|
|