basic_fstream

basic_fstream

template <class E, class T = char_traits<E> >
    class basic_fstream : public basic_iostream<E, T> {
public:
    explicit basic_fstream();
    explicit basic_fstream(const char *s,
        ios_base::openmode mode = ios_base::in | ios_base::out);
    basic_filebuf<E, T> *rdbuf() const;
    bool is_open() const;
    void open(const char *s,
        ios_base::openmode mode = ios_base::in | ios_base::out);
    void close();
    };

The template class describes an object that controls insertion and extraction of elements and encoded objects using a stream buffer of class basic_filebuf<E, T>, with elements of type E, whose character traits are determined by the class T. The object stores an object of class basic_filebuf<E, T>.