I am watching a video about how to build a Hash table, but from the beginning there is a line that I don't understand:
int main(int argc, char** argv){
What does "char**" mean?
Thanks in advance.
I am watching a video about how to build a Hash table, but from the beginning there is a line that I don't understand:
int main(int argc, char** argv){
What does "char**" mean?
Thanks in advance.
That is one of the allowable function signatures for the designated start of the program.
It is a requirement of a C++ executable that it contain one and only one of:
int main()int main(int argc, char** argv) (This function signature of main is allowed to take additional parameters.)You can find more information about main here: http://en.cppreference.com/w/cpp/language/main_function
To specifically quote the definition of argv:
Pointer to the first element of an array of pointers to null-terminated multibyte strings that represent the arguments passed to the program from the execution environment (
argv[0]throughargv[argc-1]). The value ofargv[argc]is guaranteed to be 0.
For a more detailed documentation of how Microsoft populates argv you can see here: https://msdn.microsoft.com/en-us/library/17w5ykft.aspx