Single Level Inheritance Example in c++
// Example of single level Inheritance (A->B) #include<iostream.h> #include<conio.h> class A // base class { public: void display() { cout<<"Hello from A \n"; } }; class B : public A // Now class B have public version of class A { // now class B have display method of parent class A }; void main() { B obj; //object of child class clrscr();