Question: in C++ create a function print_data. It has one argument which is a fstream. This argument will be the binary file with records that are

in C++ create a function print_data. It has one argument which is a fstream. This argument will be the binary file with records that are structures. Print all the records in the file to the screen using the following format. Change the blanks to represent the field within the structure that is being outputted. The order of the data being outputted is the id, first name, last name, salary, and the bonus. This is a void function.

cout << _______ << " " << _______ << " " << " Salary: " << " Bonus: " << setw(10) << _______ << endl; Struct contents: struct employee_data { int id; char first_name[20]; char last_name[40]; double salary; double bonus; };

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!