What is the use of ** in C++? [duplicate]

Vertex* is pointer-to-Vertex, so Vertex** is pointer-to-pointer-to-Vertex — one more level of indirection.

For example:

int i = 0;
int * iPtr = &i;        // iPtr -> i
int ** iPtrPtr = &iPtr; // iPtrPtr -> iPtr -> i

Leave a Comment