Redirected stream on C/C++ (同时兼容C/C++的可重定向流)