我看不懂---基类成员访问-----访问protected成员:
c++ primer 740
NameQuery只能访问一个Query类对象的protected成员:他自己的Query子对象。
(这些protected 成员在派生类中通过隐式this指针被访问。关于this指针的
介绍.解决这个解决编译时刻的最直接办法公有成员函数location()重写compare()
函数:
bool
NameQuery::
compare(const Query *pquery)
{
int myMathches=_loc.size();
???? int itsMatches=pquery->location()->size();
return yMatches==itsMatches;
}
那样一句话是啥意思。。。
问的是:他怎样访问私有函数size 的