我收到错误 C2512: 'derived' : no proper default constructor available在派生类的构造函数定义中出现错误。我的代码如下所示。我该如何解决这个问题?
Class A
{
int a, int b;
A(int x, int y)
{
sme code....
}
}
Class B
{
int a, int b, int c;
B(int x, int y, int Z)
{
sme code....
}
}
Class derived : public A, public B
{
derived(int a, int b):A(a, b)
{
}
derived(int a, int b, int c):B(a, b, c)
{
}
}