Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   multiple base objects - scenario. (http://www.velocityreviews.com/forums/t285188-multiple-base-objects-scenario.html)

Paul 08-24-2004 11:25 AM

multiple base objects - scenario.
 
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.

Victor Bazarov 08-24-2004 01:30 PM

Re: multiple base objects - scenario.
 
Paul wrote:
> 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


All times are GMT. The time now is 08:03 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.