Hi programmers!
I am trying to grasp the concept of friendship.
Let's say that we have the following:
class List; //forward declaration
class ListNode
{
friend class List; //make List a friend
/*
rest of code here, blah, blah, blah.
*/
}
Does this mean that ListNode can access Lists's private members and List cannot access ListNode's private members, or both classes can access each others private members conversely?