Program to call other programs

Posted by Evil on Stack Overflow See other posts from Stack Overflow or by Evil
Published on 2010-04-08T16:51:24Z Indexed on 2010/04/08 16:53 UTC
Read the original article Hit count: 291

Filed under:
|
|
|

hello. I am writing a program that will solve a type of min. spanning tree problem. i have 2 different algorithms that I've gotten working in two separate .cpp files i've named kruskels.cpp and prims.cpp.

my question is this:

each file takes the following command line to run it . time ./FILENAME INPUTFILE FACTOR

i would like to make a program that, depending on what inputfile is entered, will run either kruskels.cpp or prims.cpp. how can i do this?

this program must pass those command line arguments to kruskels or prims. each file (kruskels.cpp and prims.cpp) are designed to be run using those command line arugments (so they take in INPUTFILE and FACTOR as variables to do file io).

this should be for c++.

© Stack Overflow or respective owner

Related posts about command

Related posts about line