Advertisement
Josif_tepe

Untitled

Dec 2nd, 2023
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3.  
  4. using namespace std;
  5. class Base {
  6. public:
  7.     Base() {
  8.         cout << "Base class" << endl;
  9.     }
  10. };
  11. class Derived : public Base{
  12. public:
  13.     Derived() : Base() {
  14.         cout << "Derived class" << endl;
  15.     }
  16. };
  17. int main()
  18. {
  19.    
  20.     Derived d;
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement