the *
is used for pointers, but what is **
used for? I found this question in a video I was watching on implementing a hash table passed into main
as char **argv
.
Asked
Active
Viewed 141 times
-3

DaWise_Weirdo
- 19
- 1
- 9
-
4Pointer to pointer. Pointers point to stuff. Sometimes that stuff is other pointers. – WhozCraig Feb 07 '21 at 09:09
-
Pointer to pointer. Like array of string in case of argv (no hashtable) or array of arrays and so on. Use optional book about C for more details. – honzakuzel1989 Feb 07 '21 at 09:11
1 Answers
0
A pointer to a pointer. The most common case is
int main(int argc, char** argv)
Since pointers can point to an array, pointers to pointers are commonly used to arrays of arrays.
Also used as function arguments when setting the value of a pointer.

doron
- 27,972
- 12
- 65
- 103