关于下面代码,说法错误的是( )
语句 Shape* shapePtr = &circle; 和 shapePtr =&rectangle; 出现编译错误
Shape 为基类, Circle 和 Rectangle 是派生类
通过继承, Circle 和 Rectangle 复用了 Shape 的属性和方法,并扩展了新的功能
Circle 和 Rectangle 通过重写(override)基类的虚函数 area 和基类指针,实现了运行时多态