Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Multiple Inheritance?

ErnieErnie Member Posts: 7
My Question is about constructors.Say the base class is BOX
and the Derived class called CARTON and we have a class called
CONTENTS and then a derived class from two base classes called
CEREALPACK.If i make a object in main() from class type CEREALPACK how does the constructor and sub-objects work.Ive got an idea deal i just want to make sure that i`m thinking right!

Thanks



Comments

  • Naeem SiddiquiNaeem Siddiqui Member Posts: 2
    : My Question is about constructors.Say the base class is BOX
    : and the Derived class called CARTON and we have a class called
    : CONTENTS and then a derived class from two base classes called
    : CEREALPACK.If i make a object in main() from class type CEREALPACK how does the constructor and sub-objects work.Ive got an idea deal i just want to make sure that i`m thinking right!
    :
    : Thanks
    :
    :

    hi friend:

    this is sequence of constructors that will be called if create the object of CEREALPACK

    box,CARTON,CONTENTS and then CEREALPACK

    the size of object will be sum of all classes size

    regards:
    Naeem

Sign In or Register to comment.