running another program from a C++ program

L

Lorenzo Bettini

Hi

I'd like to run a program from a running C++ program (i.e. spanning a
new process) and would like to have access to its standard input and
standard output and error (possibily via streams).

I know about the popen posix function but that's not very flexible...
is there a C++ way?

thanks in advance
Lorenzo
 
V

Victor Bazarov

Lorenzo said:
I'd like to run a program from a running C++ program (i.e. spanning a
new process) and would like to have access to its standard input and
standard output and error (possibily via streams).

I know about the popen posix function but that's not very flexible...
is there a C++ way?

No. All those things are platform-specific.

V
 
R

red floyd

Lorenzo said:
Hi

I'd like to run a program from a running C++ program (i.e. spanning a
new process) and would like to have access to its standard input and
standard output and error (possibily via streams).

I know about the popen posix function but that's not very flexible...
is there a C++ way?

thanks in advance
Lorenzo

Nope, it's system dependent. I'd recommend either comp.unix.programmer
(based on your posix comment), or comp.windows.ms.programmer for win32.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top