Program to call other programs
- by Evil
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++.