Lets say I have two classes
Widget
^
|
Window
and I have another class Application:
Defined as follows
class Application
{
public:
...
private:
friend Widget;
};
This will not give Window access to Applications protected and private members. Is there a way to accomplish this without declaring Window and any subsequent "Widget" as a friend of Application?