template <class E, class T = char_traits<E> >
class basic_ofstream : public basic_ostream<E, T> {
public:
explicit basic_ofstream();
explicit basic_ofstream(const char *s,
ios_base::openmode mode = ios_base::out | ios_base::trunc);
basic_filebuf<E, T> *rdbuf() const;
bool is_open() const;
void open(const char *s,
ios_base::openmode mode = ios_base::out | ios_base::trunc);
void close();
};
The template class describes an object that controls insertion of elements and encoded objects into 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>
.