good [C++ Reference]
Keywords: io,good
Date: 2009-03-09T12:17:26-0700

[[good]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## good

Syntax:

        bool stream::good();

The function good() returns true if no errors have occurred with the current stream, false otherwise.

Related Topics: bad, clear, eof, exceptions, fail, rdstate

Stream states:

- if (s): The previous operation was successful (a shorthand for !s.fail()).
- if (s.fail()): The previous operation failed.
- if (s.eof()): Reading past the end has been attempted.
- if (s.bad()): Stream state is undefined; the stream can no longer be used.
- if (s.good()): None of bad/eof/fail are set.

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •