Zero argument count in main()?

77 views Asked by At

I want to design an application that will run as GUI (wxWidgets) if there are zero arguments or parameters passed to main(). I can't get rid of command line (console) feature because the application will be run from scripts. The application will also be run from File Explorer or executed from a desktop icon.

This brought about the question: Can the first argument of main(int count, char ** parameters) be zero?

Use Case 1: In Windows 10, using File Explorer (or shortcuts), will the argument count be zero?

I know that the first parameter is the absolute name of the executable, when run in command window.

Environment:
Windows 10 command window or desktop icon or File Explorer
Microsoft Visual Studio 2019
wxWidgets

0

There are 0 answers