[VC7.1 Windows XP]
hi,
I'm using a 3rd party library producing output to stdout.
As I'm developpong a console application, it is really annoying.
I found a way to bypass it:
//saving the old stdout stream
std::streambuf* oldcoutbuf = std::cout.rdbuf();
//setting the cout stream to NULL
std::cout.rdbuf(NULL);
//calling the annoying code
ThirdPartyCodeProducingAnnoyingCouts();
//restoring the cout stream
std::cout.rdbuf(oldcoutbuf);
is it safe to do it like that ?
if not, how should I handle it ?
Thanks for your help.
Stephane
http://www.exotk.org