Originally Posted by
Barney McGrew
Are you sure you're using it correctly, and are you sure they are what's causing the problem (and not something else)? There are a few things you ought to look out for:
— Check the return value of fopen.
— Ensure that you're passing the correct arguments to those functions.
If you're logging data to a file infrequently, then it might be beneficial to only open the file (in append mode) when you need to log data, and close it immediately after. I don't really see how having an opened file could be a problem, since stdin, stdout, and stderr are typically open for your entire program's interpretation unless you close them manually. You aren't using winsock functions with FILE objects, are you?