Correct any errors in the following codesegments:
The following code should write 100 empty ClientData objects tothe ofstream object outCredit, which
has already been successfully opened.
ClientData blankClient; // constructor zeros out each datamember // output 100 blank records to file for ( int i = 0; i <100; i++ ) outCredit.write( ( blankClient ), sizeof( ClientData ));
The following line of code should create fstream objectoutCredit attached to file “credit.dat” for input
and output of fixed-length records.
fstream outCredit( “credit.dat”, ios::in & ios::out &ios::binary );
Expert Answer
An answer will be send to you shortly. . . . .