In C, Printing to stdout is easy, with printf from stdio.h.
However, how can print to stderr? We can use fprintf to achieve it
If you don't want to modify current codes and just for debug usage.
Add this macro:
#define printf(args...) fprintf(stderr, ##args)
//under GCC
#define printf(args...) fprintf(stderr, __VA_ARGS__)
//under MSVC
Change stderr to stdout if you want to roll back.
It's helpful for debug, but it's not a good practice.