<<< The need for overloaded assignment operator | Index | The this keyword >>> |
A C++ reference is like a pointer, except:
Usage syntax is like an object
References always refer to something
References can't be reassigned to something else
This is enforced by:
Requiring initialization in case of variables
The implicit reference initialization in case of function parameters
No syntax exists to changing the referent (the object that a reference is pointing to)
Once instantiated, the reference becomes eternal synonym for an object or a variable
See C++ reference handout ( presentation ) for details.
<<< The need for overloaded assignment operator | Index | The this keyword >>> |