Yes it really is. Read the syntax from right to left: it reads a link to a pointer. This is important if you want to change the pointer passed to the function. The pointer is effectively passed by reference, like any other parameter.
Here is an example:
void no_change(int * ptr) { ptr = 0; } void change_ptr(int *& ptr) { ptr = 0; } int main() { int *x; change_ptr(x); }
The value of any pointer passed to change_ptr will be changed because we pass it by reference.
Please note that the value of the object pointed to by the pointer can be changed using the no_change function (i.e. *ptr = new int ). This syntax applies only to the actual pointer, and not to its object accessing the object.
source share