Standard C++ Library Reference ISO/IEC (VERSION3)

basic_fstream::is_open
bool is_open();
The member function returns rdbuf()-> is_open().
basic_fstream::open
void open(const char *filename,
ios_base::openmode mode =
ios_base::in | ios_base::out);
The member function calls rdbuf()-> open(filename, mode). If that function returns
a null pointer, the function calls setstate(failbit).
basic_fstream::rdbuf
basic_filebuf<Elem, Tr> *rdbuf() const
The member function returns the address of the stored stream buffer, of type pointer to
basic_filebuf<Elem, Tr>.
basic_ifstream
template <class Elem, class Tr = char_traits<Elem> >
class basic_ifstream : public basic_istream<Elem, Tr> {
public:
basic_filebuf<Elem, Tr> *rdbuf() const;
basic_ifstream();
explicit basic_ifstream(const char *filename,
ios_base::openmode mode = ios_base::in);
bool is_open() const;
void open(const char *filename,
ios_base::openmode mode = ios_base::in);
void close();
};
The template class describes an object that controls extraction of elements and encoded objects
from a stream buffer of class basic_filebuf<Elem, Tr>, with elements of type Elem,
whose character traits are determined by the class Tr. The object stores an object of class
basic_filebuf<Elem, Tr>.