473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

iomanipulator

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"

?
Jan 11 '06 #1
10 2276
shaun roe wrote:
Is it possible to write an IO manipulator to replace one word with
another?


Yes.

--
Salu2
Jan 11 '06 #2
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
Jan 11 '06 #3
On 11 Jan 2006 22:44:40 +0100 in comp.lang.c++, Julián Albo
<JU********@terra.es> wrote,
shaun roe wrote:
Is it possible to write an IO manipulator to replace one word with
another?


Yes.


How?

Jan 11 '06 #4

"David Harmon" <so****@netcom.com> wrote in message
news:44****************@news.west.earthlink.net...
On 11 Jan 2006 22:44:40 +0100 in comp.lang.c++, Julián Albo
<JU********@terra.es> wrote,
shaun roe wrote:
Is it possible to write an IO manipulator to replace one word with
another?


Yes.


How?


See Victor's reply.

-Mike
Jan 12 '06 #5
On Thu, 12 Jan 2006 00:31:15 GMT in comp.lang.c++, "Mike Wahler"
<mk******@mkwahler.net> wrote,

"David Harmon" <so****@netcom.com> wrote in message
news:44****************@news.west.earthlink.net.. .
On 11 Jan 2006 22:44:40 +0100 in comp.lang.c++, Julián Albo
<JU********@terra.es> wrote,
shaun roe wrote:

Is it possible to write an IO manipulator to replace one word with
another?

Yes.


How?


See Victor's reply.


But I want to see Julián's reply.

Jan 12 '06 #6
David Harmon wrote:
> Is it possible to write an IO manipulator to replace one word with
> another?

Yes.

How?


See Victor's reply.


But I want to see Julián's reply.


See Mike's reply.

--
Salu2
Jan 12 '06 #7

"Julián Albo" <JU********@terra.es> wrote in message
news:43********@x-privat.org...
David Harmon wrote:
>> Is it possible to write an IO manipulator to replace one word with
>> another?
>
>Yes.

How?

See Victor's reply.


But I want to see Julián's reply.


See Mike's reply.

--


Do I detect the scent of recursion?

-Mike
Jan 13 '06 #8
Mike Wahler wrote:
"Julián Albo" <JU********@terra.es> wrote in message
news:43********@x-privat.org...
David Harmon wrote:

>>>Is it possible to write an IO manipulator to replace one word with
>>>another?
>>
>>Yes.
>
>How?

See Victor's reply.

But I want to see Julián's reply.


See Mike's reply.

--

Do I detect the scent of recursion?


I think it's called "wrapping"...

V
Jan 13 '06 #9
Mike Wahler wrote:
"Julián Albo" <JU********@terra.es> wrote in message
news:43********@x-privat.org...
David Harmon wrote:
>>> Is it possible to write an IO manipulator to replace one word with
>>> another?
>> Yes.
> How?
See Victor's reply.
But I want to see Julián's reply.

See Mike's reply.

--


Do I detect the scent of recursion?


See Mike's reply.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Jan 13 '06 #10
Mike Wahler wrote:
See Victor's reply.

But I want to see Julián's reply.


See Mike's reply.

Do I detect the scent of recursion?


I don't think so, unless Victor put a reply saying "See Mike's or Julian's
reply"

--
Salu2
Jan 13 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Puvendran | last post by:
Hi, I am very much a newbie in c++ and would appreciate feedback on the following. Due to known bug with setw() iomanipulator such that it only works against numeric output , I need to create...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.