void open(const char *s, ios_base::openmode mode = ios_base::in);
The member function calls rdbuf()-> open(s, mode | ios_base::in). If that function returns a null pointer, the function calls setstate(failbit).
rdbuf
()->
open
(s, mode | ios_base::in)
setstate
(failbit)