![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
明星海棠果
这个作者很懒,什么都没留下…
展开
-
文章标题
class animal{public: virtual void cry() = 0;};class dog :public animal{public: void cry(){ cout << "this dog is cring !!!" << endl; } void doThings(){ cout << "the dog原创 2016-01-24 22:00:07 · 193 阅读 · 0 评论 -
C++类型转换
1.static_cast :静态类型转换 2.reinterpreter_cast :重新解释类型,有点类似于强制转换3.dynamic_cast 动态类型转换,在父子类之间的多态类型转换 代码例子:` class animal{ public: virtual void cry() = 0;};class dog :public animal{ public: vo原创 2016-01-24 21:58:59 · 243 阅读 · 0 评论