It is possible to have a pointer pointing to another pointer. For example:

int value{10};
int *ptr1{&value};
 
int **ptr2{&ptr1};

Here, ptr1 is pointer storing address of integer value value. ptr2 is a pointer which is holding address of integer value ptr1.

We need to dereference a pointer to pointer to get the actual value as shown below:

std::cout << **ptr2;

Dereferencing just once gives the address of pointer which is pointer to an integer value. So, we need to dereference again to get the actual value.

References

  1. https://www.learncpp.com/cpp-tutorial/pointers-to-pointers/