• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Output to a file using C

PoofyHair

Junior Member
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.
 
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.
 
Back
Top