Data File - The Fstream.h Header File

The Fstream.h Header File

In C++, file input/output facilities are implemented through a component header file of C++ standard library. This header file is fstream.h. The fstream library predefines a set of operations for handling file related input and output. It defines certain classes that help one perform file input and output. For example, ifstream class ties a file to the program for input; ofstream class ties a file to the program for output; and fstream class ties a file to the program for both input and output. The classes defined inside fstream.h derive from classes under iostream.h, the header file that manages console I/O operations in C++. Following figure shows the stream class hierarchy.

The functions of these classes have been summarised in the following table:

Read more about this topic:  Data File

Famous quotes containing the word file:

    A common and natural result of an undue respect for law is, that you may see a file of soldiers, colonel, captain, corporal, privates, powder-monkeys, and all, marching in admirable order over hill and dale to the wars, against their wills, ay, against their common sense and consciences, which makes it very steep marching indeed, and produces a palpitation of the heart.
    Henry David Thoreau (1817–1862)