I have a following code
struct A {
int x;
A(int i) : x(i) {}
virtual void a() {};
};
struct B: virtual A {
B() : A(0) {}
virtual void a(){}
};
struct C: A, virtual B
{
virtual void a(){}
virtual void c(){}
};
The following code fails during the compilation
I add the C constructor C():A(1){} but the compilation still fails ...
Can somebody explain me what is the problem and how can I solve it?