Skip to main content

Posts

Showing posts with the label Multilevel Inheritance

C++ Program On Multilevel Inheritance-Accept & Display Details Of Employee/Student.

This is a sample C++ program on multilevel inheritance. Using Multilevel Inheritance, this program accept input from the user and displays the details of a student or employee. #include <iostream.h> #include <conio.h> #include <stdio.h> #include <math.h> class person {     private:        int age;        char name[20];     public:        void read()          {             cout<<" Enter Age & Name: ";             cin>>age;             gets (name);          }        void disp()          {             cout<<'\n'<<'\n'<<" ******Details Of Person****** "<<'\n'<<'\n';           ...