Initialising it with a valid, non-zero value is
pointing to a particular variable.
A pointer is nothing more than a single number, and that number is a memory address. When you "point a pointer at a particular variable", what you are really doing is storing the memory address of that variable in the pointer. So:
double *z = &myValue;
z = &myValue;
is pointing z
; i.e. it is storing the address of myValue
If you later do:
this is not
at another variable; it is changing the value of the variable that z
is already pointing to, to be equal to the value of someOtherValue
. The result of this will be to change the value of myValue
, because that's the variable z
is already pointing to.