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.