Hi,
Here's my problem. I have C code that does a bunch of number crunching, spitting out intermediate results to the output files along the way. However, in some applications, it would be preferable to NOT write any data to output files (e.g., when the program is run iteratively in an nonlinear optimization routine).
Rather than hunt through my code to find all the instances of fprintf(fpout, ...) and insert a conditional statement, it would be much easier (and cleaner) if I could simply initialize the file pointer to a stream going nowhere.
I've tried setting fpout = NULL but that doesn't work. Any suggestions?
Scott