shaun roe wrote:
Is it possible to write an IO manipulator to replace one word with
another?
e.g.
cout<<replaceHello<<"hello world"<<endl;
would print "goodbye world"
?
If your manipulator stuffs a special buffer into the stream, and then your
special buffer performs like a filter, and delays output to the real
buffer until it gets a whole word, and when the whole word is in, it
outputs something different to the real buffer...
I guess, the answer is "anything is possible".
V