read

rdstate

#include <iostream.h>int 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 the I/O system is held in an integer, in which the following flags are encoded:

Name

Meaning

ios::goodbit

No errors occurred.

ios::eofbit

End of file is encountered.

ios::failbit

A nonfatal I/O error has occurred.

ios::badbit

A fatal I/O error has occurred.

These flags are enumerated inside ios.

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

Related functions are eof( ), good( ), bad( ), clear( ), 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