- Friendships are not symmetric – If class
Ais a friend of classB, classBis not automatically a friend of classA.
"I thought you were my friend, but the feelings were not mutual." - Friendships are not transitive – If class
Ais a friend of classB, and classBis a friend of classC, classAis 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
Baseis not automatically a friend of classDerivedand vice versa; equally ifBaseis a friend of another class,Derivedis 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)
10 years ago
No comments:
Post a Comment