If I have a base class:
class Base{
...
};
and a derived class
class Derived : public Base{
...
}
does this derived class always call the default constructor of the base class? i.e. the constructor that takes no parameters? For example If I define a constructor for the base class:
Base(int newValue);
but I do not define the default constructor(the parameterless constructor):
Base();
(I recognize this is only a declaration and not a definition) I get an error, until I define the default constructor that takes no parameters. Is this because the default constructor of a base class is the one that gets called by a derived class?