It calculates everything correctly, I am just not sure how to get it all to show up...and I'm not quite sure how to add the code at the bottom of the top picture either.
Any help is greatly appreciated! I tried to explain it the best I could...but I'm still very new at this.
you have extra "payroll >> id >> hours >> rate;". when ever you use that it moves to cursor for reading the file therefore you skip lines by using it too many times. to fix ur problem delete line 32 - 34 and 67 - 69. also when i ran the program i didnt line number 1, i dunno how you did
just create variables before the while loop and these variables will hold the total of the columns. set each of them to 0. when youre reading the values from the file (or after you calculate a value, such as overtime pay) just add the value onto your total value each time and after the while loop you should be able to display however the values however you want.
Step by step example for pay total:
1. Create a pay total variable before the while loop (total variables should be the same type as the single variable). Set the total to 0.
2. In the while loop, add the calculated value of the employees pay onto the total
3. After while loop, display the value however you want
Do this for every total value
P.S. for employee total just add one onto the total every time the while loop loops