Foucs on C++
1. 隐含的转化操作,例如把一个derived class指针转化为一个指向其public base type的指针
sharp* ps = new circle();
2. 经过virtual function机制
3.经过dynamic_cast和typeid运算符
circle *pc = dynamic_cast<circle*>(ps)
Powered by: 博客园 Copyright © 2024 SmartVessel Powered by .NET 9.0 on Kubernetes