Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //multipal inheritance
- #include<iostream.h>
- #include<conio.h>
- class a
- {
- public :
- void funca()
- {
- cout<<"\nFunction A is Called";
- }
- };
- class b : public a
- {
- public:
- void funcb()
- {
- cout<<"\nFunction B is Called";
- }
- };
- class c : public b
- {
- public:
- void funcc()
- {
- cout<<"\n Function C is called";
- }
- };
- void main ()
- {
- clrscr();
- c obj;
- obj.funca();
- obj.funcb();
- obj.funcc();
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement