:. Links
-Home
-History of C++
-Data Types in C++
-Arrays
-Basics
-Classes & Objects
-Files
-Inheritance
-Strings
-Structures
-Operator Overloading

:. Xtraas

-Programming Links
-Sign Guestbook


:: Inheritance ::

Inheritance allows you to create a hierarchy of classes, with various classes of more specific natures inheriting the general aspects of more generalized classes. In this way, it is possible to structure a program starting with abstract ideas that are then implemented by specific classes. For example, you might have a class Animal from which class dog and cat inherent the traits that are general to all animals; at the same time, each of those classes will have attributes specific to the animal dog or cat.

A few programs that show the use of inheritence are given below:

  1. Program to show multilevel inheritence,

     

© 2006 Austinium Webworx