title: Execute .exe file from c++ code + enter values
body: <p>I'm relatively new to c++, and I'm just making some simple programs.</p>
  
  <p>One of my programs will need to open up a different .exe file. This .exe file will ask for 2 or 3 file names, then run and exit.</p>
  
  <p>Just to test this out, I created a simple_calc.exe file, that ask for value1, then value2 then multiply them.</p>
  
  <p>So let's say I want to create a "call_other_file.exe" and automatically run "simple_calc.exe" with value1 and value2 taken from "call_other_file.exe"s file.
  How can I proceed to do that?</p>
  
  <p>After searching a bit, i see something like:
  system("simple_calc.exe -val1 -val2").</p>
  
  <p>But that doesn't work for me. Or I'm not sure how to define val1 and val2...</p>
  
  <p>edit: the program I want to access (simple_calc.exe in the example), I can not change the code there, I don't have access to it's .cpp file.</p>
  
  <p>Any suggestions?</p>