explicit basic_ifstream();
explicit basic_ifstream(const char *s,
ios_base::openmode mode = ios_base::in);
The first constructor initializes the base class by calling basic_istream
(sb)
, where sb
is the stored object of class
basic_filebuf
<E, T>
. It also initializes sb
by calling basic_filebuf
<E, T>()
.
The second constructor initializes the base class by calling basic_istream(sb)
. It also initializes sb
by calling
basic_filebuf
<E, T>()
, then sb.
open
(s, mode | ios_base::in)
. If the latter function returns a null pointer,
the constructor calls setstate
(failbit)
.