//Employee Program #include #include #include #include using namespace std; void addEmployee(string name[], double rate[], char gender[],int &count); //add new employee void genderRate(double rate[], char gender[],int count); //show average rate for men and women char menu(); //shows choices, inputs and returns selection void printAll(string name[], double rate[], char gender[],int count); //list all employees void raiseRateAll(double rate[],int count); //Raise the rate of all employees by same amount void raiseRateOne(string name[], double rate[], int count); //Raise rate for one employee void processChoice(char choice, string lastname[], double rate[], char gender[],int count); //call selected function void readfile(string name[], double rate[], char gender[],int count); //reads file and populates arrays int search(string name, string lastname[], int count); //searches for one name, returns position or -1 int main() { string lastname[40]={"Brown","Smith","Jones"}; //allow 40 names double rate[40]={7.50,9.00,8.25}; //hourly rate for same 40 people char gender[40]={'m','f','m'}; int employCount=3; //number of people, there may be less than 20 char choice=menu(); while ((choice != 'q' ) && (choice != 'Q' ) ){ choice=menu(); } //while system("pause"); return 0; } //main char menu() { //show menu and return selection char choice; cout<<"Enter Q to quit.\n"; cin>>choice; return choice; } //menu