why do we need virtual methods in C++?

http://stackoverflow.com/questions/2391679/why-do-we-need-virtual-methods-in-c

Basic idea: when mark a method as virtual in a parent class, the compiler will check the method in the child class firstly.

posted @ 2015-04-18 16:06  zmiao  阅读(139)  评论(0编辑  收藏  举报