65,207
社区成员
发帖
与我相关
我的任务
分享
class A:public ...
{
public:
bool isInherit(string strObj)
{
//function.
}
}
C#里面就简单了 C++还真不知道 不过网上应该可以搜到楼主问题的答案吧!
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;
}
};