multiple base objects - scenario.

Discussion in 'C++' started by Paul, Aug 24, 2004.

  1. Paul

    Paul Guest

    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.
     
    Paul, Aug 24, 2004
    #1
    1. Advertising

  2. 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
     
    Victor Bazarov, Aug 24, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zeng
    Replies:
    5
    Views:
    409
    John Saunders
    Aug 20, 2003
  2. REB
    Replies:
    0
    Views:
    346
  3. Ing. Rajesh Kumar

    How to use validation controls in this scenario ?

    Ing. Rajesh Kumar, Jul 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    398
    Sergey Poberezovskiy
    Jul 23, 2004
  4. Paul
    Replies:
    9
    Views:
    511
  5. 7stud
    Replies:
    11
    Views:
    714
    Dennis Lee Bieber
    Mar 20, 2007
Loading...

Share This Page