Hello I am writing a program in C. I start it like that after compilation.
/a.out <source.txt >output
I want all messages to be printed to the output.txt. However I would like to send errors to the console, not to the file. The problem is when i use this statement in my code:
freopen( "errors.txt", "w", stderr );
fprintf (stderr, "%s\n", s);
All Erros are also printed to the output.txt file not to errors.txt I would be grateful for any help.