| ios::rdstate iostate rdstate ( ) const; | ios | 
| cplusplus.com | 
 Get control state.
 
Returns the current stream control state flags.
Parameters.
 Return Value.
 
An object of type ios_base::iostate that can
contain any combination of the following state flag member constants:
 Example.
// getting state of stream object
#include <iostream>
#include <fstream>
using namespace std;
int main () {
  ifstream is;
  is.open ("test.txt");
  if ( (is.rdstate() & ifstream::failbit ) != 0 )
    cerr << "Error opening 'test.txt'\n";
  return 0;
}
Basic template member declaration ( basic_ios<charT,traits> ):
| iostate rdstate () const; | 
 See also.
 
fail,
good,
bad,
eof,
clear,
 
ios class