1. The class template basic_ifstream with the specializations ifstream and wifstream is
for read access to files (“input file stream”).
2. The class template basic_ofstream with the specializations ofstream and wofstream is
for write access to files (“output file stream”).
3. The class template basic_fstream with the specializations fstream and wfstream is for
access to files that should be both read and written.
4. The class template basic_filebuf with the specializations filebuf and wfilebuf is used
by the other file stream classes to perform the actual reading and writing of characters.
The classes are related to the stream base classes, as depicted in Figure 15.2, and are declared in the
header file as follows: