
692 Applications with Files
(7) The class ofstream creates output
stream objects, and the class ifstream
creates input stream objects.
(8) The close() member function closes
the file.
(9) The open() function uses the same
stream object. The open() function has
two arguments. The first is the file name,
and the second is the mode.
(10) When the end of the file is detected, the
process of reading data can be easily ter-
minated. The eof() function() is
used for this purpose. The eof() stands
for the end of the file. It is an instruction
given to the program by the operating
system that the end of the file is reached.
The eof() ...