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