Advertisement
Josif_tepe

Untitled

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