Is it necessary to call parent constructor with no arguments from child class constructor?
If I have a class A:
class A {
public:
A() : value(100) { }
int get_value() { return value; }
private:
int value;
};
And a class B that inherets from A:
class B : public A {
public:
B() : A() {}
};
Will the constructor of A be called when initializing an object of B even if I do not have: B() : A() {}
and the value
set to 100
?