Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

=+impact member states and MNEs?

Answered: 1 week ago