Opening a File for Input and Output in Binary Mode
Line 16 uses the
outCredit to open the existing
credit.dat file. The file is opened for input and output in binary mode by combining the file-open modes
ios::binary. Opening the existing
credit.dat file in this manner ensures that this program can manipulate the records written to the file by the program of Fig. 14.11, rather than creating the file from scratch.