64,685
社区成员
发帖
与我相关
我的任务
分享
class A:public ...
{
public:
bool isInherit(string strObj)
{
//function.
}
}
class A
{
public:
string str;
A()
{
this->str="A";
}
};
class B:public A
{
public:
B(){}
bool isInherit(string strObj)
{
if(strObj==str)
return true;
else
return false;
}
};