What are the arguments passed into the main method of a command-line program:
int main(int argc, const char * argv[])
what is the first int mea
As wikipedia (and any other source says):
int main(void)
int main(int argc, char *argv[])
The parameters argc
, argument count, and argv
, argument vector, respectively give the number and value of the program's command-line arguments. The names of argc
and argv
may be any valid identifier in C, but it is common convention to use these names. In C++, the names are to be taken literally, and the "void
" in the parameter list is to be omitted, if strict conformance is desired. Other platform-dependent formats are also allowed by the C and C++ standards, except that in C++ the return type must stay int; for example, Unix (though not POSIX.1) and Microsoft Windows have a third argument giving the program's environment, otherwise accessible through getenv in stdlib.h:
int main(int argc, char **argv, char **envp)