Output to a file using C

PoofyHair

Junior Member
Oct 21, 2007
13
0
0
Hi,

I'm in the process of writing a program that cites sources for you. However, I've come across a problem. Whenever I run the code, it never outputs to the file that I desire. The program just continues on. Here is the fprint section.

Is there anything wrong with it? I can post the entire program if necessary.
Thanks in advanced.
 

Neverm1nd

Member
Jul 3, 2006
42
0
0
Test the return value of fopen and fprintf. If either of them fail, check the global errno or your system's equivalent after the step that fails.

Test with a full path to see if the working directory is wrong.
 

PoofyHair

Junior Member
Oct 21, 2007
13
0
0
Ah, I found my error. The case statement was correct. I just forgot a scanf statement. Thanks for your help.