I\'m running some commands with the C++ system()
function:
int system ( const char * command );
How can I collect the standard
Are you looking for returned value (as in "exit status") of the executed command, or for its output (as in "what did it print")?
If the latter, use popen() and pclose() instead.
If the former, look at the return value from system()
(and use the information from the waitpid() information to interpret it).
I suggest the popen() functions, as said by other people as well, but this problem is platform specific. the popen() function is available on operating systems that use the POSIX API. I am not sure if this command would work on other APIs like WIN32