What I'm trying to do is access a datafile that lists a first name and a salary. I need to use an "Employee" class that my teacher provided.
I am having problems understanding how to incorporate the input of the stream to the constructor functions in the Employee class. I need to keep track of how many employees are read in the file, what the minimum and maximum salary is and also the average salary. All these things need to be output to the screen.
I have included a zip file with the Employee class, my program (emps.cpp), and the datafile (emps.dat) that I am using. However, the program needs to be capable of reading an infinite (relatively) amount of employees out of the file.
I need help in bringing the lines of data into the program and sending that data to the appropriate constructor function in the Employee class.
All help is appreciated. This is making me insane.