Question: What to do after step 11 (struct.cpp) Make a program that will do the following. 1. Download the input file, employees. dat, from my public
What to do after step 11



![the copy command (cp). tsmith001@empress cs111] op fesslottles111/employees dat Copying into the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5428eb7314_39066f5428e3a9d1.jpg)
(struct.cpp) Make a program that will do the following. 1. Download the input file, employees. dat, from my public directory. While you are in your own cs111 directory, use the copy command (cp). tsmith001@empress cs111] op fesslottles111/employees dat Copying into the current directory Assume this input file contains an unknown number of linesemployees. Each line contains the information about an employee first name, last name, gender, hourly rate, employee id and age. Assume the number of lines/employees never exceeds 100. Ada Agusta F 10.00 19569 28 Issac Asimov M 18.25 63948 58 2. Create a struct called employee 3. In the main, create 2 arrays of the struct employee type called mAr and fAr. mAr will have all the male employees and fAr will have all the female employees. Use const for the size (100) of each array. 4. Make a function called readData that will fill mAr and fAr from the input file. This function should return the number of male employees and also the number of female employees to the caller. Assume you don't know how many employees you have (use the "while" loop). Declare the input file and open and close it within this function. read Data mi- 0; //the index to the male array fi 0; //the index to the female array declare the input file (struct.cpp) Make a program that will do the following. 1. Download the input file, employees. dat, from my public directory. While you are in your own cs111 directory, use the copy command (cp). tsmith001@empress cs111] op fesslottles111/employees dat Copying into the current directory Assume this input file contains an unknown number of linesemployees. Each line contains the information about an employee first name, last name, gender, hourly rate, employee id and age. Assume the number of lines/employees never exceeds 100. Ada Agusta F 10.00 19569 28 Issac Asimov M 18.25 63948 58 2. Create a struct called employee 3. In the main, create 2 arrays of the struct employee type called mAr and fAr. mAr will have all the male employees and fAr will have all the female employees. Use const for the size (100) of each array. 4. Make a function called readData that will fill mAr and fAr from the input file. This function should return the number of male employees and also the number of female employees to the caller. Assume you don't know how many employees you have (use the "while" loop). Declare the input file and open and close it within this function. read Data mi- 0; //the index to the male array fi 0; //the index to the female array declare the input file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
