Lecture overview -- Keyboard shortcut: 'u'  Previous page: Friends -- Keyboard shortcut: 'p'  Next page: Friends - Example 2 -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Abstraction Mechanisms, Part 1 - slide 29 : 36

Friends - Example 1

A function needs access to private variables in two classes

friends-sit6.cc
A function f get access to the private state of both class A and B.

Matrix Vector multiplication is a compelling, practical example of this approach, see §11.5 in The C++ Programming Language