C++程序编译错误,能帮忙看看吗?
#include <iostream>using namespace std;
class A{
int a,b;
public:
A(int x,int y){
a=x;
b=y;
}
};
class B:public A{
};
class C:public B{
public:
C(int x,int y):A(x,y){
}
};
int main(){
C c(1,2);
return 0;
}
rror C2512: 'B' : no appropriate default constructor available