Ok, I am somewhat new to C++ but I should be getting by now. I am having a syntax problem (I think). I am getting input from a file located in the same directory as the program, when I compile it gets the info fine, but I need the computer to take the letter representing the insurance code (this is a payroll program) which is one letter, either N, S, or F, and give it an amount.The area of focus is the top function called "inscalc". The program takes the information, which is just a single letter, in string type form, and I need the computer to decide whether it is a valid entry, either N,S, or F, and then assign the proper value to the variable and return it back to the main program. I am lost on how to do this. As you can see, I try if statements but am lost. Any help would be appreciated. I am trying to make this understandable and easy for you guys, let me know if you can help. Thanks. -David
Oh and here is the input for the program if anyone wants it.
1 2 3 4 5 6 7
Tom Anderson 7.52 45 N
Bob Conerley 17.50 40 S
John Potter 9.30 35 S
Terrance Appleby 31.00 42 F
Joseph Rinker 17.00 35 F
Todd Russell 5.00 30 S
Bill Ryan 18.25 45 N