Quote:
Depends on what you are actually trying to achieve - it may be simplest to just duplicate all fprintf() statements with the equivalent printf() statements to produce the same output on scree as on the file. Alternatively, you may ask the user if they want to output to a file or the screen - then either use printf or fprintf as approprite. [Or, if you want to be really tricky, when the user answers console, just set the testFile = stdout, so that the output can be done using fprintf(testFile, ...) for both cases - stdout is a file that normally is represented by the scree/console].
i don't get it, I mean, I want to open the file, to notepad... Like those programs that output the log-files.. Yeah, that's what I mean... Thanks... -_+