#include<iostream>
#include<conio.h>
using namespace std;
class CParent
{
public:
virtual bool operator == (int iValue)
{
std::cout << "parent" << std::endl;
return true;
}
virtual ~CParent()
{
}
};
class CSon: public CParent
{
public:
virtual bool operator == (int iValue)
{
std::cout << "CSon" << std::endl;
return true;
}
virtual ~CSon()
{
}
};
int main()
{
CSon oSon;
CParent *pParent = &oSon;
CSon *pSon = &oSon;
*pParent == 0;
*pSon == 0;
getch();
return 0;
}