码迷,mamicode.com
首页 > 编程语言 > 详细

why do we need virtual methods in C++?

时间:2015-04-18 17:30:02      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

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.

why do we need virtual methods in C++?

标签:

原文地址:http://www.cnblogs.com/miaoz/p/4437568.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!