class SuperClass
{
public:
SuperClass(int foo)
{
// do something with foo
}
};
class SubClass : public SuperClass
{
public:
SubClass(int foo, int bar)
: SuperClass(foo)
{
// do something with bar
}
};
Does Subclass inherit the constructor of the superclass?
What does its inherit and why i need to specify in sub class constructor the : SuperClass(foo)
?