printf is printing to the file
Dear all,
I’d like to share with you a strange behavior I’ve been seen with the printf C language function running in Fedora.
The code opens a file as showed:
descString = fopen( strcat( stringName, “.txt”), “a+” );
There are also some printf functions in the code.
However, instead of the printf functions to print their content at the screen, they’ve been printing them in the file with the descString file descriptor.
Have you ever seen something like that?
To print something to the file I use the fprintf function. I didn't make a mistake to confuse printf with fprintf. I'm sure.
Thanks in advance!
Best regards,
MPRT
|