#include #include class first { public: int x; }; class second:virtual public first { public: void getdata() { cout<>x; } void display() { cout<<"n Entered Value of X by means of second class is: "<<x; } }; class third:virtual public first { public: void getdata() { cout<>x; } void display() { cout<<"n Entered Value of […]
#include #include class trial { public: virtual void getdata()=0; virtual void display()=0; }; class basic:public trial { private: int x; public: void getdata() { cout<>x; } void display() { cout<<"n Entered Value of X was : "<<x<<"n"; } }; class salary:public basic { private: int x; public: void getdata() { cout<>x; } void display() { […]