I know *ptr is a pointer variable called ptr
Does **ptr mean its a pointer to a pointer?
If that is true, what is the meaning of a pointer to a pointer?
Any pointers (pun intended) are very much appreciated.
I know *ptr is a pointer variable called ptr
Does **ptr mean its a pointer to a pointer?
If that is true, what is the meaning of a pointer to a pointer?
Any pointers (pun intended) are very much appreciated.
It depends on the context.
In a declaration, X **ptr
declares an object that is a pointer to a pointer to X
.
Outside of a declaration, **ptr
dereferences both pointers, yielding the value.
Remember that a pointer is just an object that holds the address of another object. So a pointer to pointer is just that: an object that holds the address of another object, which happens to be a pointer.