How to execute another exe from a C++ program in Windows
c++, windows
Solution
you can use the `system` function
int result = system("C:\\Program Files\\Program.exe");
Problem
I want my C++ program to execute another .exe, in Windows. How would I do this? I am using Visual C++ 2010. Here is my code ``` #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { unsigned int input; cout << "Enter 1 to execute program." << endl; cin >> input; if(input == 1) /*execute program here*/; return 0; } ```