Pointers and References in C++: Working with References
C++ supports a variable type known as the reference. You can think of references as being easier-to-use lighter-weight versions of pointers. Begin by getting familiar with the syntax and semantics of references in C++ including the use of the & symbol to denote a reference type. Note some important differences between references and pointers how references need to be assigned when they are created how they cannot be reassigned or set to NULL and how multiple references to the same underlying value are all effectively aliases for that value. Move on to declaring and using variables of reference type. Finally learn about const references and experiment with different configurations of loops where the loop variables are references value types and const references. Upon course completion youll be able to define and initialize variables of reference types contrast pointers and references and correctly use const references.