#include <iostream>
#include <stdio.h>
using namespace std;

class A
{
public:
    A()
    {
        puts("this is A!");
    }
};

class B : A
{
public:
    B()
    {
        puts("this is B!");
    }
};

class C : B
{
public:
    C()
    {
        puts("this is C!");
    }
};
int main()
{
    //A a;
    C c;
    return 0;
}

  

 

this is A!
this is B!
this is C!

Process returned 0 (0x0)   execution time : 0.007 s
Press any key to continue.

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2021-05-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
猜你喜欢
  • 2021-11-23
  • 2022-12-23
  • 2021-06-01
  • 2021-10-08
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案