In C++, what are the main differences between system() and shellexecute()?
In what situations should I use system() and shellexecute()?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no such thing in standard C++ as
shellexecute. So there is no difference.There’s the Win32 function
ShellExecute, but that’s a Win32 function, not a C++ standard function likesystem.ShellExecutedoes a different thing fromsystem.systemis (more or less) equivalent to entering a command on the command line.ShellExecuteis the equivalent of double clicking a file (or right-clicking and selecting a “verb” from the list).They really have nothing in common at all.