#include<string>
#include<vector>
#include<iostream>
#include<pthread.h>
#include<vector>
using namespace std;
class test{
public:
test(){cout<<"test"<<endl;}
};
class Base{
public:
Base(){cout<<"base"<<endl;}
};
class test2:public Base{
public:
test2(){cout<<"test2"<<endl;}
private:
test t;
};
int main(void)
{
test2 tt;
return 0;
}
运行结果:
base
test
test2