//Create a structure to hold information about an Employee.
//Create fields to hold first and last name, hire date, a code indicating whether the employee works ('w')
//or is a supervisor ('s'), and a field for yearly salary.
struct Employee{
string firstName, lastName;
string hireDate;
int employeeCode;
int year_Salary;
} ;
// Write a function called "getEmp" which prompts for and reads in the information for
// a single Employee structure and then returns the structure.
Employee getEmp();
// Write a function called "putEmp" which prints out the information from a single Employee structure
// (which is passed to the function) along with a label to indicate the field being printed (ex: First Name: David).
// Also print out the meaning of the employment code, not the code itself.
void putEmp(Employee e);
int main(){
Employee e;
e = getEmp();
cout << endl;
putEmp(e);
return 0;
}
Employee getEmp(){
Employee e;
cout << " Enter first name: " ;
getline(cin,e.firstName);
cout << " Enter last name: " ;
getline(cin, e.lastName);
cout << " Enter hire date:" ;
getline(cin, e.hireDate);
cout << " Enter employee code: ";
cin >> e.employeeCode;
cin.ignore();
cout << " Enter yearly salary: ";
cin >> e.year_Salary;
cin.ignore();
return(e);
}