Ok I redid my code ad it runs but the answer is unreadable any thoughts
I am trying to create a program that calculates a persons hourly wages by the hours worked, also to calculate any overtime by 1.5. and put it in a loop to take multiple employes.
In function `int main()': 77
request for member `income' in `payrollEmp1', which is of non-class type `data[5]' 77
request for member `payRate' in `payrollEmp1', which is of non-class type `data[5]' 77
request for member `hoursWorked' in `payrollEmp1', which is of non-class type `data[5]' 79
request for member `shift' in `payrollEmp1', which is of non-class type `data[5]' 79
request for member `shift' in `payrollEmp1', which is of non-class type `data[5]' 81
expected primary-expression before "else" 81
expected `;' before "else" 86
request for member `hoursWorked' in `payrollEmp1', which is of non-class type `data[5]' 87
expected `;' before '{' token 106
request for member `firstName' in `payrollEmp1', which is of non-class type `data[5]' 107
request for member `lastName' in `payrollEmp1', which is of non-class type `data[5]' 107
expected `;' before "payrollEmp1" 108
expected primary-expression before '<<' token 108
At global scope: 115
expected declaration before '}' token
I don't know the answer to your question, but I would like to suggest that you use parallel arrays for the for the hours worked on the days of the week, it would make things a lot cleaner.
Edit: The other errors are in the for(int i=0; i<7; i++) section. It looks like you're trying to create an array of 5 structs. 7 would be outside the bounds. But when you're doing the loops, including for (int i=0; i<5; i++) - I don't see that you're actually accessing the different structs in the array - i.e. there's no [i] subscript being used.