<分区>
如果我没有指定对 Base** 的显式转换,为什么会出现编译错误?
处理派生类时可以使用指向指针的指针吗?
class Base { };
class Child : public Base { };
void SomeFunction(Base** ppoObj) {}
void SomeFunction(Base* poObj) {}
int main()
{
Child *c = new Child();
// This passed.
SomeFunction(c);
SomeFunction((Base**)&c);
// CompilationError
SomeFunction(&c);
return 0;
}