J
Jason Heyes
Here is what I use to redirect printed messages to a file:
std:
fstream file("logfile");
std::cout.rdbuf(file.rdbuf());
std::cout << "this message goes to a file" << std::endl;
Will the next message I print go to a file as well?
std:
rintf("does this message go to a file?");
How do I set things up so that both std::cout and std:
rintf redirect their
output to the same file? Thanks.
std:
std::cout.rdbuf(file.rdbuf());
std::cout << "this message goes to a file" << std::endl;
Will the next message I print go to a file as well?
std:
How do I set things up so that both std::cout and std:
output to the same file? Thanks.