Is there a way to redirect c++ output inside the code? The situation is this, I am using some external .cpp and .h files which use printf's to put warnings to console. I wish to redirect "only" these outputs (not mine) to a file "without" modifying their code.
So; in my program, I can redirect ouput to a file, and when I will put some output redirect again to default console, after that again to file, so on...
Is it possible?