Нулевое количество аргументов в main()?C++

Программы на C++. Форум разработчиков
Гость
Нулевое количество аргументов в main()?

Сообщение Гость »


Я хочу разработать приложение, которое будет работать как графический интерфейс (wxWidgets), если в него передано ноль аргументов или параметров.. 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


Источник: https://stackoverflow.com/questions/781 ... nt-in-main

Вернуться в «C++»