Back To C++ Inheritance Index
//program to demonstrate multiple inheritance, class fourth is derived from three base classes (first,second and third) in public access mode #include
#include
class first { int a; public: void firstgetdata() { cout<<"\nenter value for a "; cin>>a; } void firstshowdata() { cout<<"value of a is "<
>b; } void secondshowdata() { cout<<"\nvalue of b is "<
>c; } void thirdshowdata() { cout<<"\nvalue of c is "<
>d; } void showdata() { firstshowdata(); secondshowdata(); thirdshowdata(); cout<<"\nvalue of d is "<