C++ Style redirection of standard I/O Stream