I have a doubt with inheritance in C++. Please look at the following class declarations;
class A {
....
};
B inherits from A
class B: public A{
...
};
C inherits from A too
class C
ublic A{
...
};
If I now want to declare a class D that inherits from B & C how would I do it
to avoid multiplay inheriting from A ? If I do the following ,then I guess D will
inherit multiply from A.
class D: public B, public C
{
...
};
Thanks for your help in advance
Pillai
class A {
....
};
B inherits from A
class B: public A{
...
};
C inherits from A too
class C
...
};
If I now want to declare a class D that inherits from B & C how would I do it
to avoid multiplay inheriting from A ? If I do the following ,then I guess D will
inherit multiply from A.
class D: public B, public C
{
...
};
Thanks for your help in advance
Pillai