#include<iostream>
using namespace std;
class Base
{
};
class Derived:public Base
{
public:
//Base a;
Derived(int n)
{
cout<<"Derived "<<n<<endl;
}
};
int main()
{
Derived d(9);
system("pause");
}
结果: