#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
class base_A {
public:
base_A()
{
cout << "创建base_A" << endl;
}
};
class base_B {
public:
base_B()
{
cout << "创建base b" << endl;
}
};
template<typename T>
class Derived :public T{
public:
Derived(): T()
{
cout << "创建derived对象" << endl;
}
};
int main()
{
Derived<base_A>a;
Derived<base_B>b;
system("pause");
return 0;
}