Pure virtual function call

巧了我就是萌 提交于 2019-12-05 07:54:04

This error happens when a constructor or a destructor directly or indirectly calls a pure virtual member.

(Remember that during constructor and destructor execution, the dynamic type is the constructed/destructed type and so virtual members are resolved for that type).

A "pure virtual function" is a function that has no definition in the base class. It means that all children of that base class will have an overridden implementation of that function, but the base class does not have an implementation.

In your example, it looks like you are calling a pure virtual function, so you are calling a function that is declared, but since you are not calling any child's implementation, it has no definition.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!