Pointers vs References in C++ code example
Example: difference between pointer and reference in c++
Pointers:
A pointer is a variable that holds memory address of another variable.
A pointer needs to be dereferenced with * operator to access the
memory location it points to.
References :
A reference variable is an alias, that is,
another name for an already existing variable.
A reference, like a pointer, is also implemented
by storing the address of an object.