<分区>
Possible Duplicate:
Conversion of pointer-to-pointer between derived and base classes?
Converting Derived** to Base** and Derived* to Base*
我有一个 intf + 类
class IList
{
public:
virtual IList** GetChildList()=0;
virtual void SetChildList(IList**)=0;
~IList();
};
class CList:public IList
{
CList** m_lst;
public:
IList** GetChildList()=0;
virtual void SetChildList(IList**);
//...
};
IList** CList::GetChildList()
{
return m_lst;
}
为什么我在 MSVC 中的 GetChildList 中收到错误 2440,提示“'return':无法从 'CList** **' 转换为 'IList **”
提前感谢您的帮助!