I think you need just an example to how to create objects from A
:
int main()
{
A obj1(10, 20); // Calls A(10, 20) average: 15
A obj2; // Calls A() -> A(0) -> A(0, 0) average: 0
A obj3(100); // Calls A(100) -> A(100, 0) average: 50
}
1
solved Delegating Constructors [closed]