multiple base objects - scenario.

P

Paul

In real life situation, do we ever come across a situation where we
would need two base objects in an object.
We programmers can better understand program than english :) so...
class A
{
};
class Derived1:public Base
{
};
class Derived2: public Base
{
};
class Dervied12:public Derived1, public Derived2
{
//two objects of Base
};
//typical, just no virtual derivation of Base
Just to set the point right, I know we can remove one Base by using
virtual, but that's exactly not the goal here, do we have case where
we need two Base objects, can we compare it with any real life
situation.
Is amphibian comes any way close to this???
your inputs are appreciated.

thanks,
-Paul.
 
V

Victor Bazarov

Paul said:
In real life situation, do we ever come across a situation where we
would need two base objects in an object.
[...]

I never encountered a situation where I'd specifically need two
bases (i.e. virtual inheritance would be against what I'd want).

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top