Can someone please explain to me what the difference is between:
a) declaring a nested class as a friend of the class it's inside
b) declaring the members of the main class as protected, thereby allowing the nested class access to them
?
I've got a vague idea but it'd be nice to hear what more knowledgeable people have to say.
The thought has occurred to me that (b) isn't actually possible as 'protected' applies to inheritance (whereas the use i'm suggesting implies composite rather than inherited classes).
Thanks!