如何实现运行时多态性 [英] How to achieve run time polymorphism

查看:306
本文介绍了如何实现运行时多态性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现运行时多态性

推荐答案

您可以使用继承和重写的虚函数。祝你的学校考试/作业好运。
You use inheritance and overridden virtual functions. Good luck with your school test/assignment.


你可以参考以下链接以获得更多的理解。



运行时多态性VS编译时多态性 [ ^ ]
You can refer the below link for more understanding.

run-time polymorphism VS compile-time polymorphism[^]


这篇关于如何实现运行时多态性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆