#include<iostream>
using namespace std;
class Pet
{
	int a;
public:
	virtual ~Pet()
	{
		cout<<"Pet"<<endl;
	}
};
class Dog:public Pet
{
	int a;
public:
	~Dog()                                     //不需要重复使用virtual
	{
		cout<<"Dog"<<endl;
	}
};
 int main()
 {
	 cout<<sizeof(Pet)<<endl<<sizeof(Dog)<<endl;    //输出类型长度
	 Pet* point=new Dog;
	 delete point;
	 return 0;
 }
