Line 16 uses the fstream
object 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::in
, ios::out
and 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.
18.188.198.94