Does a subclass inherit, the main class\' friend associations (both the main class\' own and other classes friended with the main class)?
Or to put it differently, h
You can create (static) protected methods in the parent that will allow you to do things like that.
class MyFreind
{
private:
int m_member;
friend class Father;
};
class Father
{
protected:
static int& getMyFreindMember(MyFreind& io_freind) { return io_freind.m_member; }
};
class Son : public Father
{
public:
void doSomething(MyFriend& io_freind)
{
int& friendMember = getMyFreindMember(io_freind);
// ....
} // ()
};
This however bypasses encapsulation so you probably should take a second look at your design.