How to execute another exe from a C++ program in Windows

前端 未结 5 1357
迷失自我
迷失自我 2020-12-10 07:06

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\"
#in         


        
5条回答
  •  情话喂你
    2020-12-10 07:35

    you can use the system function

    int result = system("C:\\Program Files\\Program.exe");
    

提交回复
热议问题