Why won't fclose work?

I've narrowed the segmentation fault down to the line:
 
     fclose(outputfile);

What am I doing wrong? code executes fine until then, but nothing afterwards. What are some possible causes?

should I do fclose(&outputfile) instead? or something like that?

edit: sorry never mind.... it had never opened successfully.... lol
Last edited on
You could have knackered you program earlier. How was outputfile initialised.
Topic archived. No new replies allowed.