469,647 Members | 1,750 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

Reading stdin from stdout of another application

Hi all. I am trying to set up a C++ program which will continuously
read stdin from another applications stdout. I will continue reading
until I read a message that will indicate to stop. Does anyone have
any ideas on how I can do this?

Thanks for responses.
Jul 19 '05 #1
1 4433
On 1/8/03 6:51 pm (UK time), Lisa C let loose these words:
Hi all. I am trying to set up a C++ program which will continuously
read stdin from another applications stdout. I will continue reading
until I read a message that will indicate to stop. Does anyone have
any ideas on how I can do this?


AFAIK, only the OS can control where stdin comes from.

In MS-DOS or Unix (don't know about other platforms), use a pipe

qwert | yuiop

will run qwert, the stdout of which becomes the stdin of yuiop.

Stewart.

--
My e-mail is valid but not my primary mailbox. Please keep replies on
on the 'group where everyone may benefit.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jan Knop | last post: by
5 posts views Thread by Jean-Pierre Bergamin | last post: by
3 posts views Thread by Mike Tammerman | last post: by
3 posts views Thread by Fernando Arbeiza | last post: by
7 posts views Thread by gyan | last post: by
reply views Thread by Gabriel Genellina | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.