Lecture overview -- Keyboard shortcut: 'u'  Previous page: Strings - examples -- Keyboard shortcut: 'p'  Next page: Rules for 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 15 : 42

References

A reference in C++ is an alias

A reference is an alternative name for an object

  int k = 3;
  double a = 5.0;
  double &d = a;
  void f(int &i, double &d);
  f(k,a);

A reference in C++ can be understood as a generalization of "call by reference parameters"