一个基类,基类里面有个虚函数,一个子类实现了这个虚函数,但是在new这个子类的时候报如上题目这样的错误。
阿神2017-04-17 11:21:42
Virtual functions declared in the base class must be inherited and implemented in the derived class. This error will not be reported when new is a derived class. I carefully reviewed the code and found that one parameter of the virtual function in the base class has const, but not in the subclass. This is an error. Modify it to make the parameters consistent. That's it.