Re: [Dev-C++] capture command line output
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Alfred P. R. <al...@ya...> - 2005-10-18 02:57:33
|
Hi Noorez, This is a case of redirecting cout (stdout) and/or cerr (stderr) to an input stream. This is something I've never tried, to be honest. A simple way would be to output redirect (>) the output of the command line program to a temporary text file, then import and display the text file in your GUI, deleting the text file after capture. BTW: insight.exe probably uses this capability, as it's actually a GUI shell for GDB. So it's source may be helpful. Also see: http://forum.java.sun.com/thread.jspa?threadID=535799&messageID=2596130 http://www.cplusplus.com/ref/iostream/ios/rdbuf.html http://lists.boost.org/Archives/boost/2005/01/78560.php ***!!!*** Noorez Kassam <lor...@ho...> wrote: I have a GUI program that calls on another command line program to perform a task on a file, but how do i capture the results of the command line output so that i can use it in my GUI and display it to the user? <snip> Alfred P. Reaud |