Original Post
I am curious if anyone knows of a way to capture everything that is being sent to stdout in a c++ program into another iostream. Mainly, so a mirrior of the output can be sent to a file. I know it's possible using a shell to save the output, but sometimes that get's confusing since programs with input won't see the output. So anyways, is there a way to attach one ostream to another or something, so that all data gets sent to one gets sent to the other (without explicitly having to tell it to send it to them both)?