Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

start program

Status
Not open for further replies.

elfanddot

Programmer
Feb 21, 2002
28
0
0
US
Thank you even if you can't answer![sadeyes]
Does anyone know of or explain a method of either communicating between two program (one main, one child)
in a dos environment.
I need to either start a program from within another program with some starting arguments and ignore the program, or i need to constantly pass information between the two. the first method is prefered because the starting arguments are ment to be the address of a class where the main program can change value and the child program can read the values. although any working method to get me going will work fine.[thumbsup2]
 
A C++ program can be called with arguments. In DOS, your main function would look something like
Code:
int main(int argc, char * argv[])
where argc is the number of arguments passed to the program and argv is an array with the arguments.

To start the child process in DOS, you might want to look at execl, spawnl, or one of their variants. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top