Can you have a pointer reference? |
Of course you can. A pointer is just a type of variable. You can do the same things with it as you can with any other type. You can have a reference to it just like you can any other type of variable.
Or should I just add a pointer to a pointer? |
What do you mean by that? What would it mean to add two pointers together?
Or are you asking if you can have a pointer to a pointer? If so, then, yes, of course you can. A pointer is just a type of variable. You can do the same things with it as you can with any other type. You can have a pointer to it just like you can any other type of variable.
aren't & and * opposites? |
Huh? You seem very confused about what those symbols mean.
When using
*
as a unary
operator, it dereferences a pointer operand. When using
&
as a unary
operator, it gets the address of the operand. So, I suppose you could call the dereference operatore, and the address-of operator "opposites", in a sense.
But none of that has anything to do with using those symbols in a
variable definition. When you use a
*
in a variable definition, you are not using the dereference operator. When you use a
&
in a variable definition, you are not using the address-of operator. So, in a variable definition, I can't imagine any sense in which you would call those symbols "opposites".