在 32 位机器上,对齐模数为 8,下面代码的输出结果是:
#include <iostream> using namespace std; class A { virtual void func() { cout << "func" << endl; } float f; char p; int adf[3]; }; int main() { cout << sizeof(A); return 0; }
class A{ virtual void func(){ cout<<"func"<<endl; } float f; char p; int adf[3]; };