March 2018
Intermediate to advanced
183 pages
2h 34m
English
References allow programmers to create new names for a variable. They provide a simpler, safer, and less powerful alternative to pointers.
A reference is declared in the same way as a regular variable, except that an ampersand is appended between the data type and the variable name. Furthermore, at the same time as the reference is declared, it must be initialized with a variable of the specified type.
Once the reference has been assigned, or seated, it can never be reseated to another variable. ...