Windows是否有自己的'call other .exe'功能(C++)

0 c++ windows system running-other-programs

我知道在C++中有一个函数

system("example.exe");
Run Code Online (Sandbox Code Playgroud)

运行另一个程序,把它需要包含stdlib.h.

因为我已经包含'windows.h',是否system()与Windows中的函数等效?

pet*_*hen 15

CreateProcess来运行特定的可执行文件,或者ShellExecute用于运行程序或打开带有相关程序的文档.

如果对其他平台的可移植性是任何问题,我会坚持使用系统.#include stdlib.h不会杀了你;)