C++:Working With Files -1
A program typically involves either or both of the following kind of data communication:- 1. Data transfer between console unit and program 2. Data transfer between program and disk file. Input Stream- supplies data to program or reads data from file. Output Stream- recieves data from program or writes data to file. Input operation involves the creation of an input stream and linking it with the program and input file. ________________________________________ Classes for FIle Stream Operations I/O system of c++ contains a set of classes that defines the file handling methods. These include ifstream , ofstream and fstream . These classes are derived from fstreambase class and corresponding iostream class. _________________________________________ Opening and Closing of File The filename is a string of character conatining two parts - primary name and optional period with extension. eg. Input.data test.doc Opening fil...