Virtual Table layout in memory?

后端 未结 6 1537
陌清茗
陌清茗 2021-02-08 13:11

how are virtual tables stored in memory? their layout?

e.g.

class A{
    public:
         virtual void doSomeWork();
};

class B : public A{
    public:         


        
6条回答
  •  清歌不尽
    2021-02-08 13:44

    As others have said, this is compiler dependant, and not something that you ever really need to think about in day-to-day use of C++. However, if you are simply curious about the issue, you should read Stan Lippman's book Inside the C++ Object Model.

提交回复
热议问题