I have 2 different executables which use traditional cin/cout to interact with the user.
Lets imagine it is a program that inputs some numbers and outputs the result.
Now I want to write a driving program in C++ that calls these executables and provides inputs to them ("cin>>"'s a value) and also gets the result of their cout.
I tried using system()
that makes a command line call that starts the executable. But I am not able to provide a further input(in some cases inputs) to that. Any idea how to do that?
Unfortunately I can't switch the program to take command line arguments.