- Friendships are not symmetric – If class
A
is a friend of classB
, classB
is not automatically a friend of classA
.
"I thought you were my friend, but the feelings were not mutual." - Friendships are not transitive – If class
A
is a friend of classB
, and classB
is a friend of classC
, classA
is not automatically a friend of classC
.
"Just because he is your friend doesn't make him my friend." - Friendships are not inherited – A friend of class
Base
is not automatically a friend of classDerived
and vice versa; equally ifBase
is a friend of another class,Derived
is not automatically a friend and vice versa.
"You've changed. You are not the person I used to know. I don't like you anymore."
More: https://en.wikipedia.org/wiki/Friend_class
Goodbye to All That (2014)
9 years ago
No comments:
Post a Comment