in_stream.open("payroll.txt");
if (in_stream.fail())
{ //unable to open file
cout << "Unable to open file" << endl;
}
else
{ //file open - now can read from it
// I don't understand why you read the first record before the main loop.
// Unless it was a preamble of some form.
while( !in_stream.eof() ) // loop to read records...
{
// assuming the first pattern of the data file which I described.
getline(in_stream, name);
in_stream >> hours;
in_stream >> hourlyRate;
// blah blah blah... for your code.
} // end of while.
}// end of if.
Again I suspect that the data read in choices are wrong because of other problems I have seen that are similar. If that were true, the getline should be in_stream >> firstName; and in_Stream >> lastName; consequently.