By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,305 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,305 IT Pros & Developers. It's quick & easy.

Reading stdin from stdout of another application

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.