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:
1 2 3 4
|
double myValue;
double *z = &myValue;
z = &myValue;
|
is pointing
z at
myValue; i.e. it is storing the address of
myValue in
z.
If you later do:
this is
not pointing
z 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.