how to determine the size of virtual base class and derived classes from it?

前端 未结 4 1055
梦谈多话
梦谈多话 2021-01-05 12:53
#include 
using namespace std;

class base1{};
class base2{virtual void show(){}};

class test1{    };
class test2{virtual void show(){}};

class der         


        
4条回答
  •  北海茫月
    2021-01-05 13:26

    how to determine the size of virtual base class and derived classes from it??

    Use sizeof().

提交回复
热议问题