Professional Documents
Culture Documents
Write a function to read the input file and store the data in arrays.
Write a function to calculate regular pay.
Write a function to calculate overtime pay
Write a function to calculate gross pay.
Write a function to bubble sort the employees into order by last name, first name.
Write any swap functions that are needed.
Write a function to write output to a file called payroll.txt
But your regular function function isn't working, for the reasons I've explained - it's trying to use the
values of hours and rate , but you haven't given them any values.
Edit: You should pay attention to the compiler warnings. They usually tell you useful things.
Last edited on Nov 6, 2013 at 6:32pm
Nov 6, 2013 at 7:40pm
narutopk1985 (2)
1. Move the file pointer to the next line of your file before starting the loop. One way of doing it can be
char buff[255] = {0}; inputFile.getline(buff, 255);
2. Read the input in a correct sequence as stored in your input file. example:
while (inputFile >> hours) // there is a line of data to read
{
inputFile >> rate;
inputFile >> employee;
inputFile >> firstname;
inputFile >> lastname;
Nov 7, 2013 at 1:14am
GokuK97 (73)
ohh i got it
Nov 7, 2013 at 1:15am
GokuK97 (73)
but give me error it o make one change