Lecture overview -- Keyboard shortcut: 'u'  Previous page: Constant References -- Keyboard shortcut: 'p'  Next page: Parameter passing in C++ -- 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 19 : 42

References versus Pointers

Examples that compare programming with pointers and C++ references

swap.cc
Two versions of swap - with references and with pointers.
A reference may be implemented as a constant pointer that is dereferenced automatically each time it is used