How does dynamic casting works when you don't cast to the most derived

后端 未结 0 1679
半阙折子戏
半阙折子戏 2020-11-22 01:21

Lets examine following case

struct A{
  virtual ~A(){}
};
struct B : public A{
  virtual ~B(){}
};
struct C : public B{
  virtual ~C(){}
};
int main(){
  A* a         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题