I am making a simple bash terminal with the SFML framework for C++. I understand how to begin an external process with the system() fn, but I need a way to stream a child process's output into the current script. Is there a simple way to do this? Perhaps using an fstream hack? I am using Unix.
-
Which OS? There's popen on linux that might do what you wantvmpstr– vmpstr2012-03-01 21:01:02 +00:00Commented Mar 1, 2012 at 21:01
-
It is a POSIX function, not only on Linux. ;-)DejanLekic– DejanLekic2012-03-01 21:04:21 +00:00Commented Mar 1, 2012 at 21:04
-
1@DejanLekic I'd rather be safe than sorry :) All I can claim is that it's on my linux OS, but thanks for the correction!vmpstr– vmpstr2012-03-01 21:08:51 +00:00Commented Mar 1, 2012 at 21:08
Add a comment
|