R
rhitz1218
All:
I'm trying to create a log file. I now I can be able to do that by
doing the following:
FILE *outfile;
outfile = fopen("log.txt", "w");
fprintf("This is the text");
Now questions is, I have a bunch of functions, so whenever I got
to a function I would like to write something in my log file, Is is
possible to basically just put the fprintf inside every function, and
the lines will go after the other?
Like for example
func1()
printf("This is the first message");
func2()
prinf("this is the second message");
In my log file.
I will have
This is the first message
this is the second message
I'm trying to create a log file. I now I can be able to do that by
doing the following:
FILE *outfile;
outfile = fopen("log.txt", "w");
fprintf("This is the text");
Now questions is, I have a bunch of functions, so whenever I got
to a function I would like to write something in my log file, Is is
possible to basically just put the fprintf inside every function, and
the lines will go after the other?
Like for example
func1()
printf("This is the first message");
func2()
prinf("this is the second message");
In my log file.
I will have
This is the first message
this is the second message