<分区>
我正在尝试在下面的代码中做一些类似的事情。我在 VS 的问题标题中遇到错误。谁能告诉我哪里出了问题?
class A
{
public:
int x;
A(int x = 15)
{
this->x = x;
}
};
class B : public A
{
public:
int a,b,c;
B(int a, int b, int c)
{
this->a = a;
this->b = b;
this->c = c;
}
B(int a, int b, int c, int x) : A(x), /*here is error*/B(a,b,c)
{
}
};