Skip to content

Multiple Inheritance

Delton Hughes edited this page Apr 29, 2023 · 1 revision

Multiple Inheritance

Definition: Say we have three classes and one is the parent the other is the child and the third is the child of the child. It allows the last child to inherit from the parent of the first child and the original parent.

Code Example:

class Shape {
protected:
   
public:

};

class Rectangle : public Shape {
public:
  
};

class Triangle : public Shape {
public:
}
  • Each term will have as follows: -> A definition on the term -> A code example some being in great detail if needed, for example a class example is going to be longer than a member variable. -> Lastly, a picture which in some way relates to the term but may also relate to other terms as well.
Clone this wiki locally