#include<iostream>
using namespace std;
class Pet
{
public:
	virtual void function() 
	{
		cout<<"Pet function"<<endl;
	}
	virtual void function1() 
	{
		cout<<"Pet function1"<<endl;
	}
};
class Dog:public Pet
{
public:
	void function()
	{
		cout<<"Dog function"<<endl;
	}
};
int main()
{
	Pet a;
	Dog b;
	Pet* point=&a;
	point->function();
	point->function1();
	point=&b;
	point->function();
	point->function1();
	return 0;
}