帮看看这段code# JobHunting - 待字闺中
m*e
1 楼
这段code有什么问题?
Thanks
struct Exception
{
virtual int Type(){ return 0;}
};
struct ExceptionChild:Exception
{
virtual int Type(){ return 1;}
};
int _tmain(int argc, _TCHAR* argv[])
{
try
{
throw ExceptionChild();
}
catch(ExceptionChild e)
{
printf("Type value %d", e.Type());
}
return 0;
}
Thanks
struct Exception
{
virtual int Type(){ return 0;}
};
struct ExceptionChild:Exception
{
virtual int Type(){ return 1;}
};
int _tmain(int argc, _TCHAR* argv[])
{
try
{
throw ExceptionChild();
}
catch(ExceptionChild e)
{
printf("Type value %d", e.Type());
}
return 0;
}