#include <iostream>
using namespace std;
struct A
{
 A()
 {
  std::cout << "A";
 }
};

struct B: public A
{
 B()
 {
  std::cout << "B";
 }
};

struct C
{
 C()
 {
  std::cout << "C";
 }
 B b;
 A a;
};

int main()
{
 C c;
 return 0;
}

ABAC

转载于:https://www.cnblogs.com/byfei/archive/2012/06/28/3112393.html

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐