File IO
Six steps in using File IO:
1. #include <fstream.h>
2. Instantiate an object of type needed:
ifstream InFile;
ofstream OutFile;
3. Open and attach the file object with appropriate mode.
Infile.open(“Bank.dat”, ios::in);
OutFile.open(“Bank.report”, ios::out);
Previous slide
Next slide
Back to first slide
View graphic version