C++ Payroll Program Function