多态的实现原理:
“多态”的关键在于通过基类指针或引用调用 一个虚函数时,编译时不确定到底调用的是基类还 是派生类的函数,运行时才确定 ---- 这叫“动态 联编”。“动态联编” 底是怎么实现的呢?
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.