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
Get step-by-step solutions from verified subject matter experts
