those two multiply the output into a file:
void redirect_output(const char *filename);
void redirect_output(std::string const &filename)
those two read everything from a file:
redirect_input(const char *filename);
redirect_input(std::string const& filename);
both can be resetted using:
void reset_input();
reset_output();