C++ Parent class calling a child virtual function

前端 未结 7 870
半阙折子戏
半阙折子戏 2021-02-13 22:34

I want a pure virtual parent class to call a child implementation of a function like so:

class parent
{
  public:
    void Read() { //read stuff }
    virtual vo         


        
7条回答
  •  情深已故
    2021-02-13 23:11

    Title of the following article says it all: Never Call Virtual Functions during Construction or Destruction.

提交回复
热议问题