1.父类引用转换为子类引用
((CSubClass&)parentObj).SubFunc();
2.RPointerArray<CContact>& CPhoneBook::UngroupedContactArray() const
{
return iUngroupedContactArray;
}
会报 illegal implicit conversion from 'const RPointerArray<CContact>' to 'RPointerArray<CContact> &' 。
这时要去掉函数体的const。