Does Windows have its own 'call other .exe' function (C++)

前端 未结 3 2012
孤城傲影
孤城傲影 2021-01-28 13:58

I know in C++ there is a function

system(\"example.exe\");

that runs another program, put it requires the include stdlib.h.

<
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-28 14:54

    There is CreateProcess to run a specific executable, or ShellExecute to run programs or open documents with their associated program.

    If portability to other platforms is any issue at all, I'd stick with system. #including stdlib.h won't kill you ;)

提交回复
热议问题