I use fprintf() calls throughout a particular function. Most of them cause no problems & behave as expected. However, I've just added a conditional statement within this function, and any fprintf() statement I attempt to execute within this conditional statement, causes a core dump when the code runs.
I've verified that the values & the file pointers within this new conditional statement are all valid. I don't use fclose() on any file pointers until after this condition executes. Any thoughts about what might result in fprintf() calls in only one particular section in the middle of my code, to fail?
Thanks for your input.