Boost logo

Boost Users :

Subject: Re: [Boost-users] unexpected behaviour of filtering_ostream
From: Václav Zeman (v.haisman_at_[hidden])
Date: 2012-01-06 17:07:46

On 01/05/2012 09:58 PM, Ed Keith wrote:
> I have the following code:
> int main(int argc, char *argv[])
> {
> io::filtering_ostream out;
> out.push(std::cout);
The "problem" is that there is an implicit buffering in the filtering
stream's streambuf. Change the buffering to be minimal:

out.push(std::cout, 1, 1);

> out << "this is a test" << endl;
> out << std::cin.rdbuf();
> }
> when I run it the string "this is a test" gets sent to cout, but input
> type into cin does not get echoed to cout. Can anyone clue my in as to
> why not?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at