F
fog
class A has its children/derived classes B and C. class D is supposed to be
contained inside both B and C.
Is the code right for the above requirement?
class A
{
D d;
};
class B : public A;
class C : public A;
Now should all public and protected members in D be accessible to all
members of B and C?
Is this a good design?
Thanks for your help!
contained inside both B and C.
Is the code right for the above requirement?
class A
{
D d;
};
class B : public A;
class C : public A;
Now should all public and protected members in D be accessible to all
members of B and C?
Is this a good design?
Thanks for your help!