C++ File Handling
File Handling in C++ File are used to store the user data for extended time periods. As such the data is stored in permanent device storage. Thus, File handling becomes an essential mechanism to store the output of program or to receive inputs for a program and other various operations. To receive and send data to and from a device, stream is used as an abstraction. Stream is represented as source or destination of characters of indefinite length. In C++, file handling can be done using libraries, as such, ifstream, ofstream and fstream provide the needed functionality. These classes are derived from fstrembase and corresponding iostream class. Thus, any C++ program involving must include fstream library, as these classes are a part of the library. In C++, files are mainly dealt by using three classes fstream, ifstream, ofstream. ofstream: This Stream class signifies the output file stream and is applied to create files for writing information to files ifstream...