For more information about virtual members, see Polymorphism.
有关虚拟成员的更多信息,请参见多态性。
All you need to do is upcast from the derived class and never look back to see what exact type of object you're dealing with. Everything is handled through polymorphism.
你只需要将对象上传转化为基类对象不需要知道额外的信息,而这些都是通过多态实现的。
应用推荐