pure virtual method called error

橙三吉。 提交于 2019-12-06 13:41:12

There's another type of bug, which can cause this error message to be printed.

You deleted the object, and later you're trying to make a call on it. It's undefined behaviour, and on some compilers, if you're lucky, that's what you'll see. Try to run your code with valgrind.

http://tombarta.wordpress.com/2008/07/10/gcc-pure-virtual-method-called/

You're calling a pure virtual function from a constructor in some code that you haven't included for us to see.

When my base class's constructor calls a virtual function on its this object, why doesn't my derived class's override of that virtual function get invoked?

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