I'm having a problem with data files.

I figured out how to get my pointers and such to work while the program results were printed on the screen. However, when I try to switch over to datafiles (with an input and output file), my input file goes in (I think), and nothing comes out on my output file except for the "Total amount:" footer. No calculations were done at all.

I checked and my fscan and fprints were stated correctly, as far as I know (the other print statments are going on the compile screen, not the output file). I just can't figure out what I am missing. Here is my code.

and so on. While I know my other code is wrong for now, I feel that I have written the open and close file statements incorrectly. If they were correct, I would at least get some numbers before the program was thrown out of whack.

Also, I'm getting a "statement not reached" warning for this line

Code:

if (s_code[count] <= HIGH_SALESPERSON && s_code[count] > ZERO)

Is there a different way to write my file statements or is this actually the correct way? I'm pretty unsure at the moment.

Thanks in advance.

(The browser was really awful, so some of my code might be split up in a funky way (in particular on the function headers))