Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //single in heritance
- #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";
- }
- };
- void main ()
- {
- clrscr();
- b obj;
- obj.funca();
- obj.funcb();
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement