+ 4
Do you think pointer and reference are the same thing?
Well, they are two different things , but are very similar. How really different are them? Just a matter of style?
4 Answers
+ 7
Reference variables are like pointers behind the scenes. A reference is apparently a name constant to an address that cannot be further modified unlike a pointer.
0
Pointers hold references, references are addresses to variables.
0
~ swim ~ good answer as usual.
This is usually the natural implementation of a reference.
But I must add that the language standard does not require any particular mechanism, whether a reference uses storage or not is unspecified, one cannot write code assuming references are implemented as pointers.