#include <iostream>
using namespace std;
class A {
int j;
public:
A(int i) : j(i) { }
void print()
{
cout << sizeof(j) << endl;
}
};
class B : virtual public A {
public:
B(int i) : A(i) { }
};
class C : public B {
public:
C(int i) : B(i) { }
};
int main(int argn, char * argv[])
{
C c(1);
c.print();
return 0;
}
Login in to like
Login in to comment