Question: c++ program with random acces files, please help! 2018 Fall CIS200-Lab 7 Release date: October 24, 2018 Due date: October 31, 2018 Given: struct clientData

 c++ program with random acces files, please help! 2018 Fall CIS200-Lab

7 Release date: October 24, 2018 Due date: October 31, 2018 Given:

c++ program with random acces files, please help!

2018 Fall CIS200-Lab 7 Release date: October 24, 2018 Due date: October 31, 2018 Given: struct clientData int accountNumber; char lastNamel 15 l char firstNamel 10 1: float balance Create a random access file of 100 records named "credit.dat" using these code segments ofstream outCredit( "credit.dat", ios:out) clientData blankClient ( 0. for (inti 0; i 100; i++) outCredit.write (reinterpret_cast(&blankClient ) sizeof clientData ) ); member function write - The member function write outputs a fixed number of. bytes beginning at a specific location in memory to the specific stream. When the stream is associated with a file, the data is written beginning at the location in the file specified by the "put" file pointer. The write function expects a first argument of type const char *, hence use the reinterpret cast (&client), sizeoff clientData) ); 2018 Fall CIS200-Lab 7 Release date: October 24, 2018 Due date: October 31, 2018 Given: struct clientData int accountNumber; char lastNamel 15 l char firstNamel 10 1: float balance Create a random access file of 100 records named "credit.dat" using these code segments ofstream outCredit( "credit.dat", ios:out) clientData blankClient ( 0. for (inti 0; i 100; i++) outCredit.write (reinterpret_cast(&blankClient ) sizeof clientData ) ); member function write - The member function write outputs a fixed number of. bytes beginning at a specific location in memory to the specific stream. When the stream is associated with a file, the data is written beginning at the location in the file specified by the "put" file pointer. The write function expects a first argument of type const char *, hence use the reinterpret cast (&client), sizeoff clientData) )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!