C++ Single Inheritance

C++ Single Inheritance


C++ Single Inheritance
In this tutorial, You will learn about Single Inheritance, Single Inheritance is the one where you have a single base class single Drived class. 
C++: Inheritance |Single inheritance - Rajesh Shukla Catalyst
The Syntax of Single inheritance is as follows:
class A   // A is a base class
{
    ...
};
class B : public A // Derived class
{
  ...
};
Example- Program to shows that C++ Single Inheritance is as follows:
Output