title: How to execute another exe from a C++ program in Windows
body: <p>I want my C++ program to execute another .exe, in Windows. How would I do this? I am using Visual C++ 2010.</p>
  
  <p>Here is my code</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      unsigned int input;
      cout &lt;&lt; "Enter 1 to execute program." &lt;&lt; endl;
      cin &gt;&gt; input;
      if(input == 1) /*execute program here*/;
      return 0;
  }
  </code></pre>