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, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e não consigo tira-la no chorme
Answers: 2
question
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
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
Mathematics, 09.01.2020 07:31
question
Mathematics, 09.01.2020 07:31
question
Mathematics, 09.01.2020 07:31
question
Mathematics, 09.01.2020 07:31
question
Mathematics, 09.01.2020 07:31
question
Mathematics, 09.01.2020 07:31
Questions on the website: 13722367