std::basic_ios::good

From Cppreference

Jump to: navigation, search
bool good() const;

Returns true if the stream has no errors occurred and is ready of I/O operations. Specifically, returns result of rdstate() == 0.

Contents

[edit] Parameters

(none)

[edit] Return value

true if the stream has no errors occurred, false otherwise.

[edit] Example

[edit] See also

bad
checks if a non-recoverable error has occurred
(public member function)
fail
checks if a recoverable error has occurred
(public member function)
eof
checks if end-of-file has been reached
(public member function)
operator!
checks if an error has occurred (synonym of fail())
(public member function)
operator bool
checks if no error has occurred (synonym of good())
(public member function)