When static members are inherited, are they static for the entire hierarchy, or just that class, i.e.:
class SomeClass { public: SomeClass(){total++;}
SomeClass() constructor is being called automatically when SomeDerivedClass() is called, this is a C++ rule. That's why the total is incremented once per each SomeClass object, and then twice for SomeDerivedClass object. 2x1+2=4