Zzoni
asked on
Need Linux system call from C++ to send cout to a string
Youi've got some information here, but I can't get it to work. I need to call the system command on a Linux machine, and capture the output that would normally go to the terminal (cout) in a string (or stringstream).
For ex.:
prep string to receive what would normally go to cout
call system("ls -al" );
return cout to normal operation (sent to terminal)
For ex.:
prep string to receive what would normally go to cout
call system("ls -al" );
return cout to normal operation (sent to terminal)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.