Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is multiple inheritance?

Answer Posted / guest

You can derive a class from any number of base
classes. Deriving a class from more than one direct base
class is called multiple inheritance.

In the following example, classes A, B, and C are
direct base classes for the derived class X:

class A { /* ... */ };
class B { /* ... */ };
class C { /* ... */ };
class X : public A, private B,
public C { /* ... */ };
The following inheritance graph describes the
inheritance relationships of the above example. An arrow
points to the direct base class of the class at the tail of
the arrow:



The order of derivation is relevant only to determine the
order of default initialization by constructors and cleanup
by destructors.

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the ways in which a constructors can be called?

2113


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2139


Which method cannot be overridden?

1071


What is oops and why we use oops?

1023


What is the example of polymorphism?

1102


What is pointer in oop?

1029


What is encapsulation with example?

1079


What is the fundamental idea of oop?

1122


What is the diamond problem in inheritance?

1119


What is the point of oop?

1159


What does and I oop mean?

1157


Can bst contain duplicates?

1179


What is a function in oop?

1072


Where is pseudocode used?

1087


What polymorphism means?

1052