Homework problem...structures or arrays?
Hi. I'm new here. Im a senior in high school, and I skipped Computer Programming I, and went straight to Programming II. The problem is, I had never programmed in my life until yesterday - So I'm still getting the hang of things. I've got a problem for homework, but I dont know how I'd go about doing it. Suggestions and Ideas - please.
8. Three employees in a company are up for a special pay increase. You are given a file, Ch3_Ex8Data.txt, with the following data
Miller Andrew 65789.87 5
Green Sheila 75892.56 6
Sethi Amit 74900.50 6.1
Each input line consists of the employee's last name, first name, current salary, and precent pay increase. Write a program that reads data from the specified file and stores the output in the file Ch3_Ex8Output.dat. For each employee the days must be output in the following form: firstName, lastName, updatedSalary. Format the ouput of the decimal numbers to two decimal places.
I know how to input the file, and all the main basics of C++, but I dont understand how I can the program to like....loop for each person in the file? Maybe I'm not supposed to do that?
Any advice/help is appreciated.