Hello, I have a question about the char **argv array in then main function of a any C/C++ program.
I know that char* is a pointer to a string, but how does ** make it an array?
Could this syntax be used for other array types like "int *my_array" or is specific to char?
Also if I have a const vector<int>, do I need a special iterator like
or can I use a normal vector<int>::iterator ?
Last edited on
A char * is a pointer to an array of chars.
A char ** is a pointer to an array of pointers to arrays of chars.
Yes, the syntax can be used for anything else.
For the second question, you need to use a const_iterator.