Input / Output with Files

C++ has support both for input and output with files through the following classes:
                ofstream: File class for writing operations (derived from ostream)
                ifstream: File class for reading operations (derived from istream)
                fstream: File class for both reading and writing operations (derived from iostream)
Open a file
The first operation generally done on an object of one of these classes is to associate it to a real file, that is to say, to open a file. The open file is represented within the program by a stream object (an instantiation of one of these classes) and any input or output performed on this stream object will be applied to the physical file. LEARN MORE>>

No comments: