I seem to be having trouble compiling this program. . I get 3 different errors for the same 2 lines.
1) [Error] stray '\226' in program
2) [Error] '(pay + ((long long unsigned int)(((long long unsigned int)count) * 32ull)))->EmployeePay::gross' cannot be used as a function
3) [Error] expected ')' before numeric constant
*Lines are underlined and bolded
#include <iostream>
#include <iomanip>
using namespace std;
The stray character is the wrong sort of '-'.
The usual cause is using a word-processor rather than a plain text editor (or an editor designed for writing code).
The usual minus sign typed on the keyboard is - but the code contains – instead. The first is ASCII code 45, the second ASCII code 226. If you use a word processor, it "helpfully" changes the characters that you type into some other completely different (but perhaps visually similar) character.
Solution.
1. use a suitable code or text editor
2. change this: pay[count].overtime = ((pay[count].hours) – 40.00);
to this: pay[count].overtime = ((pay[count].hours) - 40.00);
While we're here, there are lots of unnecessary parentheses around everything here, the code works correctly (and is easier to read) without them, pay[count].overtime = pay[count].hours - 40.00;
That same comment applies to all the lines in that part of the code.
The main thing to remember is that multiplication and division take precedence over addition and subtraction
For example, 2 * 3 + 4 * 5 will be interpreted as (2 * 3) + (4 * 5)
Generally, it's not necessary to include to use parentheses unless you want to change the default interpretation.
One more error. This function has a prototype declaration: void OutputFile(EmployeeInfo[], EmployeePay[]);
but the actual function body is not defined.