I am trying to have a program pull information from a data file and utilize it for the 'cin' inputs (linux redirection/batch mode). At first, I could only get the program to read the first number; since the next value was a character. I did manage to get it to read the whole line, but it doesn't go down to read the next several lines. Here is my code so far:
Sounds like the problem you have is that a line could be in one of two formats:
int char int
or
int char int int
and you don't know until you read it which it is. So you'll have to add some branching logic. I assume the char indicates if the employee is hourly or salaried, with an 'h' or an 's'.