Im having an issue with some HW of mine, I can't get the program to access the employee.txt files and hours.txt
Problem
Assume there are two input files for a payroll program. The first contains the employee’s name (a string), id number (an integer) an hourly rate (a real number). The second contains the employee’s id number and hours worked (a real number). The records in the first file are ordered by name and the records in the second file are ordered by id number. If a person did not work during the current time period, there will be no record in the second file for that person. Write a file of payroll records to an output file for all employees. Each record should contain the employee name followed by # followed by the hours worked, hourly rate, and pay amount. Use a space as a separator between items in the output file. There should be a record in the output file for every person including those who did not work in that pay period.
would you mind describing your data tables to me?
It seems as if you are separating the fields with a TAB- or at least that is working for me,
All , except for the NAME field in the Employees file.
No matter how I format "name" in the file or in my output (test) string, I can only get trash.
The INT "id" and the DOUBLE "rate" are being displayed on my screen fine,
just not the "name" field.
I was hoping to get this running and tested on my machine, but it won't get past the first pass of "processHours()" with not having that first field available,
Although, it IS ! odd that the program does get into that subrt'n without having a valid name available - AND with nothing at all in the "HOURS" file.