Lecture overview -- Keyboard shortcut: 'u'  Previous page: Visibility and Access Control -- Keyboard shortcut: 'p'  Next page: Friends - Example 1 -- 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 28 : 36

Friends
A friend of class C has access to private and protected members of C

In some cases it is convenient define a function as a friend instead as a member.

Because a friend is activated in another way than a member: f(x,y) versus x.f(y).