“Reference-To” Logic
One of the reasons I never liked C/++ is it's illogical pointer syntax.
-
int v0=5,v1=6;
-
int* p0;
-
int *p1;
-
p0 = &v0;
-
*p0 = v1;
The first pointer declaration is ok: The star turns the type integer into a pointer-to-integer.
The second one is a bit confusing. To the readers (at least mine) eye it looks like the star belongs to the identifier, modifying it somehow. Ok, it's just the result of C/++ being a freeform language so let's go on.
The star turns any data type T into a pointer-to-T. So the same must be true for values; turning values into pointers to those values, right? Bad luck. The inventor of C chose to use a different symbol for returning the address of a value. Fine with me, as long as the star has no other appearances in the indirection business.