472,095 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 4526
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
reply views Thread by leo001 | last post: by

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.