It is possible to call a base classes function though. Also you should know that when you do something like this.
Code:
class base {
public:
base() { whatever(); }
virtual ~base() { }
virtual void whatever() {
cout << "hello world";
}
};
class child : public base {
public:
child() : base() { } //this is done by default
virtual ~child() { }
virtual void whatever() {
cout << "something";
}
};
The whatever() called in base's constructor will be base's whatever() even when a child is created. What I mean (that wasn't very clear) is that when a new child calls base's constructor during its own construction base::whatever() will be called NOT child::whatever().