为什么会用virtual函数? 如果一个函数void func(Base *b) Class A 继承 Base,Class B继承Base,当传给func为不同的子类对象,都可以实现统一的func接口。