Object layout in case of virtual functions and multiple inheritance

前端 未结 4 704
醉酒成梦
醉酒成梦 2020-11-30 00:07

I was recently asked in an interview about object layout with virtual functions and multiple inheritance involved.
I explained it in context of how it is implemented wit

4条回答
  •  鱼传尺愫
    2020-11-30 00:57

    1 thing to expect with multiple inheritance is that your pointer can change when casting to a (typically not first) subclass. Something you should be aware of while debugging and answering interview questions.

提交回复
热议问题