What kind of classes are used to work with input/output file in C++?

Question

What kind of classes are used to work with input/output file in C++?

Re: What kind of classes are used to work with input/output file

C++ provides the following classes to perform output and input of characters to/from files:
* ofstream: Stream class to write on files
* ifstream: Stream class to read from files
* fstream: Stream class to both read and write from/to files.
What kind of opening mode does C++ offer ?
ios::in Open for input operations.
ios::out Open for output operations.
ios::binary Open in binary mode.
ios::ate Set the initial position at the end of the file.
ios::app All output operations are performed at the end of the file, appending the content
ios::trunc If the file opened for output operations already existed before, its previous content is deleted