I'm using various classes that derive off each other, and I'm coming across an error in my g++ compiler that says "‘A’ is an ambiguous base of ‘D’". My code goes something like this:
class A {...};
class B : public A {...};
class C : public A {...};
class D : public B, public C {...};
I assume this error is because I am referencing class A twice, indirectly, but my instructions are to derive a class D from both classes B and C. I appericate any and all help!
My main function goes something like
int main()
{
vector<A*>v;
v.push_back(new D(...));
cout<<...;
}