Lecture overview -- Keyboard shortcut: 'u'  Previous page: Rules for references -- Keyboard shortcut: 'p'  Next page: Constant References -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Basic facilities - slide 17 : 42

References - Examples
Here we show a number of examples that illustrate various aspects of references
ref-basic.cc
A variable becomes a reference to another variable.
ref-basic-2.cc
No operator operates on a reference as such.
ref1.cc
A function with reference parameters and reference return type.
ref-fields.cc
Convenient references to long/deep fields.
Go to exercise
Another example/exercise with C++ references
Go to exercise
Pointers in combination with references
The The C++ Programming Language example on page 99-100 is also illustrative