subject

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 << setw(10) << left << cat. name;
5.) Turn in a screen print of the binary file, as shown below, along with your code and output.
OUTPUT Enter 3 cat records. Enter information about a cat: NAME: Tom AGE: 5 Enter information about a cat: NAME: Fluffy AGE: 3 Enter information about a cat: NAME: Sweet Pea AGE: 2 Record written to file Enter one more cat NAME: Jasmin AGE: 4 Here is a list of all cats: Tom Fluffy 3 Sweet Pea 2 Jasmin 4 Press any key to continue.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
List the five on-board vehicle subsystems
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
Why is hard disk space important to an audio engineer? why are usb ports and firewire ports useful for an audio engineer? explain in 2-3 sentences. (3.0 points) here's a list of different audio software: ableton live apple inc.'s garageband apple inc.'s logic studio digidesign's pro tools propellerhead sofware's reason sony creative software's acid pro steinberg cubase steinberg nuendo choose one of the software programs listed above, and then go to that software program's web site. read about what the software program is used for, and then write 4-5 sentences about what you learned. (10.0 points) which type of software license is the most limiting? why? explain in 2-3 sentences. (3.0 points) when sending a midi channel voice message, how can you control the volume of the sound? explain in 2-3 sentences. (4.0 points)
Answers: 1
question
Computers and Technology, 24.06.2019 08:20
Evaluate the scenario below and indicate how to handle the matter appropriately. situation: michael received an e-mail from what he thought was his doctor’s office, requesting his social security number. since he had just been in to see his doctor last week, he replied to the e-mail with his social security number.
Answers: 2
You know the right answer?
Write a struct object to a binary file 1.) Include the following in the driver. cpp file (in the Ca...
Questions
question
English, 29.06.2021 01:00
question
Mathematics, 29.06.2021 01:00
question
Mathematics, 29.06.2021 01:00
question
Mathematics, 29.06.2021 01:00
Questions on the website: 13722360