rdstate
Syntax:
  #include <fstream>
  iostate rdstate();

The rdstate() function returns the io stream state flags of the current stream.