I have a base class (header):
class BaseClass
{
public:
BaseClass(int); // note no default constructor.
}
and a class that derives it:
class DerivedClass : public BaseClass
{
public:
DerivedClass(void);
}
DerivedClass::DerivedClass (void) // note SPECIFICALLY no parameters.
{
super (10); // equivalent of what I am trying to do in Java (I think)
}
How do I call the constructor of the inherited class in my derived class?
like this:
NOTE: if you are unfamiliar with the syntax, look out for member initialization list.