Can c++ override base class in sub sub class

  Kiến thức lập trình

In VSC++ 2022 windows :
If i have base class :

class Base {
  public:
    virtual void _ready(){};
}

class Sub:public Base {
  public:
    //here there is no overwrite 
}

class SubSub:public Sub {
  public:
    //here i like to overwrite the Base  _ready function 
    virtual void _ready(){};
}

This gives me :

error LNK2001: unresolved external symbol "public: virtual void __cdecl fpsgame::subsub::_ready(void)"  
 windows.64.debug.dll : fatal error LNK1120: 1 unresolved externals

LEAVE A COMMENT