redirecting standard error

R

Rob Z

I use popen in C++ to grab the standard output from Unix commands. Is
there a similarly simple and fast way to grab standard error as well?
I understand Python has different popen commands for different
streams, but don't know about C++.

Thanks
 
V

Victor Bazarov

Rob said:
I use popen in C++ to grab the standard output from Unix commands. Is
there a similarly simple and fast way to grab standard error as well?
I understand Python has different popen commands for different
streams, but don't know about C++.

C++ doesn't have popen. It's your OS (UNIX) that does. And if Python
can do it, there is nothing to stop your C++ program from doing it too.
However, it's beyond the scope of this newsgroup, since it's OS-specific.
Try comp.os.<your_os>.programmer.

V
 
D

Default User

Victor said:
C++ doesn't have popen. It's your OS (UNIX) that does. And if Python
can do it, there is nothing to stop your C++ program from doing it
too. However, it's beyond the scope of this newsgroup, since it's
OS-specific. Try comp.os.<your_os>.programmer.


Or comp.unix.programmer.



Brian
 
A

Alex Vinokur

Rob Z said:
I use popen in C++ to grab the standard output from Unix commands. Is
there a similarly simple and fast way to grab standard error as well?
I understand Python has different popen commands for different
streams, but don't know about C++.

Thanks

The response has been sent to .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top