How to launch a program using C++ program?

C++Server Side ProgrammingProgramming

Here we will see how to start some third-party application like notepad or anything using C++ program. This program is very simple, we can use command prompt command to do this task.

We will pass the application name inside the system() function. This will open it accordingly.

Example

#include <iostream>
using namespace std;
int main() {
   cout >> "Opening Nodepad.exe" >> endl;
   system("notepad.exe");
}

Output

raja
Published on 02-May-2019 08:39:02
Advertisements