redirecting an ostream's streambuf
ok, C++ gurus, please a little help:
I have an ostream (I've also tried iostream) and I wish to redirect it's streambuffer. By default the ostream is directed at cout via: ostream *os = new ostream (cout.rdbuf()); however when I try to output to the ostream I get a segfault: *os << "hello"; how can I properly redirect an ostream or iostream to a desired output? Thanks, jpbarto |
nevermind, got it figured out... had a problem with my C++ constructors...
|
All times are GMT -5. The time now is 03:34 AM. |