readsome

rdstate

#include <iostream>iostate rdstate() const;

The rdstate( ) function is a member of ios.

The rdstate( ) function returns the status of the associated stream. The C++ I/O system maintains status information about the outcome of each I/O operation relative to each active stream. The current state of a stream is held in an object of type iostate, in which the following flags are defined:

Name

Meaning

goodbit

No errors occurred

eofbit

End of file is encountered

failbit

A nonfatal I/O error has occurred

badbit

A fatal I/O error has occurred

These flags are enumerated inside ios (via ios_base).

rdstate( ) returns goodbit when no error has occurred; otherwise, an error bit has been set.

Related functions are eof( ), good( ), bad( ), clear( ), setstate( ), and fail( ).




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net