windows and dos both support pipes and files too.
system("program > filename"); //dump the output of program to filename
and program < infile //infile interacts with program as if you types its contents when program was executed, eg menu option 3, value x, value y, .. etc)
and pipes let you do similar without the files.
you can also write a batch file that does the work and run the batch file from the C++.