I am having difficulty getting my overtime pay program to compile and run properly. Any advice would be greatly appreciate. Here is the existing code I have so far:
//Class declaration section
class EmployeeClass
{ // begin EmployeeClass
public: // set to public
void ImplementCalculations(string EmployeeName, double hours, double wage);
void DisplayEmployInformation(void);
void Addsomethingup(void);
// declare variables
string EmployeeName;
int hours, overtime_hours, iTotal_hours, iTotal_OvertimeHours;
float wage, basepay, overtime_pay, overtime_extra, iTotal_salaries, iIndividualSalary;
}; // end EmployeeClass
int main()
// begin main function
{ system("cls");
// display welcome information
cout << "Datamax, Inc.";
cout << "\nWelcome to the Employee Pay Center\n\n" ;
EmployeeClass Employ[3];
const int numEmployees = sizeof(Employ) / sizeof(Employ[0]);
for (int i = 0; i < numEmployees; ++i ) // create loop to collect employee information
{
cout << "\n\nEnter the employee name = ";
cin >> Employ[i].EmployeeName;
cout << "Enter the hours worked = ";
cin >> Employ[i].hours;
cout << "Enter his or her hourly wage = ";
cin >> Employ[i].wage;
}
for (int i = 0; i < numEmployees; ++i )
Employ[i].ImplementCalculations(Employ[i].EmployeeName, Employ[i].hours, Employ[i].wage);
} // end main function
void EmployeeClass::ImplementCalculations (string EmployeeName, int hours, double wage)
{
Line 50 - prototype for 'void EmployeeClass::ImplementCalculations(std::string, int, double)' does not match any in class 'EmployeeClass'
Line 16 - void EmployeeClass::ImplementCalculations(std::string, double, double)
Line 82 - prototype for 'void EmployeeClass::DisplayEmployInformation(EmployeeClass, EmployeeClass, EmployeeClass)' does not match any in class 'EmployeeClass'
Line 17 - void EmployeeClass::DisplayEmployInformation()
In member function 'void EmployeeClass::Addsomethingup()':
Line 201 - 'numEmployees' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function is appears in.)
I need the program to display the employee name, base pay, overtime hours, overtime pay, and total pay for each of the three employees.
I then need it to display the total salaries, hours, and overtime hours for all three employees added together.
I apologize for being a bit vague in my initial post but I haven't came to a forum for help before. Thanks!