Question: How to solve this by using structure and file processing? C++ thanks 8. Sorting a File of Records Using an editor, create a file emp_age.txt

How to solve this by using structure and file processing? C++ thanksHow to solve this by using structure and file processing? C++ thanks

8. Sorting a File of Records Using an editor, create a file emp_age.txt that has two columns, where the first col- umn records the name of employees and the second column records the ees. Insert at least 10 records in it. age of employ- Write a program that opens emp_age.txt in input mode and another file sort_age.txt in output mode. If the files cannot be opened, the program should display an error mes- sage and quit the program. The program should extract the first 10 records into an array of structure employee that should have the following data: First name Last name Age The program should sort the array in descending order of age and write the sorted array in the file sort_age.txt in the same format as the file emp_age.txt

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!