I am trying to input lines of code into a command line for a program from C++. I have read up on the system command, however, my main problem is once I open the command prompt, I would like to pass a line of code to the command prompt from the C++ code. My algorithm is as follows:
1. Open command prompt using C++
2. Start the executable program file using C++
3. Pass a file name from C++ code to the command prompt of the executable to open the file within the external program.
If there are any suggestions, as always I would be very grateful. Thank you.