我派生了类和基类.在派生类的构造函数中,我必须使用基类的基本构造函数.然后我想用deiffernet基类构造函数重新构造基类:
class A
{
public:
int a, b;
}
class B : public A
{
B() : A()
{
...
//do some calculations to calculate a and b and then
//re-construct class A with the right values.
A(a,b) <--- ????
}
}
Run Code Online (Sandbox Code Playgroud)
我该怎么做?