Hi all:
It is easy to declare a pointer that points to a integer:
int *ptr = NULL;
My question is how to declare a pointer that points to another pointer, basically a pointer that points to a memory address?
Thank you
Hi all:
It is easy to declare a pointer that points to a integer:
int *ptr = NULL;
My question is how to declare a pointer that points to another pointer, basically a pointer that points to a memory address?
Thank you
Consider this:
Further levels of indirection (e.g., pointer to pointer to pointer) are of course possible.Code:int x = 123; int *ptr = &x; int **p2ptr = &ptr;
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)