64位电脑 运行c++结果输出() class A { &nb...
发布于 2022-03-02 16:51:18
64 位电脑运行 C++ 结果输出()
#include <iostream> using namespace std class A { char a[2] public: virtual void aa() {} } class B : public virtual A { char b[2] char a[2] public: virtual void bb() {} virtual void aa() {} } class C : public virtual B { char a[2] char b[2] char c[2] public: virtual void cc() {} virtual void aa() {} virtual void bb() {} } int main() { cout << sizeof(A) << endl << sizeof(B) << endl << sizeof(C) return 0 }
登录后免费查看答案
关注者
0
被浏览
20