How to execute another exe from a C++ program in Windows -
i want c++ program execute .exe, in windows. how this? using visual c++ 2010.
here code
#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _tchar* argv[]) { unsigned int input; cout << "enter 1 execute program." << endl; cin >> input; if(input == 1) /*execute program here*/; return 0; }
you can use system
function
int result = system("c:\\program files\\program.exe");
Comments
Post a Comment