Question: HW 6e Write a struct object to a binary file 1.) Include the following in the driver.cpp file (in the Cats project above) 2.) Prompt

 HW 6e Write a struct object to a binary file 1.)

HW 6e Write a struct object to a binary file 1.) Include the following in the driver.cpp file (in the Cats project above) 2.) Prompt the user to enter one more cat record, and then write the data to the critters.bin file. Include code so that when the data is written to file, it is appended (added on to the - end of the existing data). 3.) After the new cat has been written to file, use a while loop to read the critters.bin file and display all four records. - With each iteration, one cat object should be read and then displayed on the screen. - Set the while loop to execute four iterations. 4.) Open the critters.bin file and verify that the file was written successfully - Use the setw0 function to output the name and age in columns. (see output) - What library does setw) require? - Does setw) align left or right? Note: To change output to left align: cout

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!