ab_tanjir

Untitled

Jan 8th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A
  5. {
  6.     public:
  7.       void display()
  8.       {
  9.           cout<<"Base class content.";
  10.       }
  11. };
  12.  
  13. class B : public A
  14. {
  15.  
  16. };
  17.  
  18. class C : public B
  19. {
  20.  
  21. };
  22.  
  23. int main()
  24. {
  25.     C obj;
  26.     obj.display();
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment