printf to stderr in C/C++
Problem:
You want to use printf
to print something to the stderr
stream (instead of stdout)
Solution
Use fprintf(stderr, ...)
For example use
stderr_example.c
fprintf(stderr,"Senselessly printing %d\n",128);
instead of
printf_example.c
printf("Senselessly printing %d\n",128);
Check out similar posts by category:
Allgemein
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow