Question: In C++ using a binary file filled with structures. write a function update_raise. It will have three arguments. The first argument is the binary file

In C++ using a binary file filled with structures. write a function update_raise. It will have three arguments. The first argument is the binary file which is an fstream. The second argument is the id of the employee who is getting the raise. The third argument is the amount of raise the employee gets. This should return true if the raise was applied If the employee id is found, add the amount of the raise to the salary field and then write the new structure of data out to the file over the top of the old data. This function will return true if the raise was given to an employee and false if it was not.

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!