Home » Developing U++ » U++ Developers corner » How does one get argc and argv parms when making use of GUI_APP_MAIN?
How does one get argc and argv parms when making use of GUI_APP_MAIN? [message #56785] |
Fri, 16 April 2021 04:52  |
ptkacz
Messages: 89 Registered: March 2017
|
Member |
|
|
> How does one get argc and argv parms when making use of GUI_APP_MAIN?
Ok, I did some digging and there appears to be a CommandLine() function that returns a Vector<String>&. When I run the program from command line, the following returns a value of ZERO:
const Vector<String>& argc = CommandLine();
cout << "argc = " << to_string(argc.GetCount()) << endl;
In a C or C++ program with main(int argc, char **argv) provided, and the program is launched with no arguments, argc returns a value of 1, so why does the count for the String Vector for CommandLine() come back as ZERO?
Peter
[Updated on: Fri, 16 April 2021 05:21] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed Apr 30 04:05:34 CEST 2025
Total time taken to generate the page: 0.01228 seconds
|