Boost logo

Boost Users :

From: Aaron Griffin (aaronmgriffin_at_[hidden])
Date: 2006-11-27 11:43:34


On 11/27/06, Andrew Schweitzer <a.schweitzer.grps_at_[hidden]> wrote:
> Is there a standard way to output to multiple streams at the same time?

You could probably use something similar to:

namespace io = boost::iostreams;

fstream f("out.txt");

io::tee_device<std::ostream,std::fstream> teedev(std::cout, f);
io::stream< io::tee_device<std::ostream,std::fstream> > my_tee(teedev);

DoSomething(my_tee);


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net