在 C++ 中,system()
和 shellexecute()
之间的主要区别是什么?
什么情况下应该使用system()
和shellexecute()
?
最佳答案
在标准 C++ 中没有 shellexecute
这样的东西。所以没有区别。
Win32 函数 ShellExecute
,但这是一个 Win32 函数,而不是像 system
这样的 C++ 标准函数。
ShellExecute
做的事情与 system
不同。 system
(或多或少)等同于在命令行中输入命令。 ShellExecute
相当于双击文件(或右键单击并从列表中选择“动词”)。
他们真的一点共同点都没有。
关于c++ - 系统与 ShellExecute - 差异?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9303660/