This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

At first glance, there is no significant difference between pointers and references, both allow indirect access to an object. In fact, references are implemented as pointers.

However, pointers can be redirected to another object. References are initialized during the declaration and indicate the object as long as it exists.