If I have something like
class Base {
static int staticVar;
}
class DerivedA : public Base {}
class DerivedB : public Base {}
Will bot
There is only one staticVar
in your case: Base::staticVar
When you declare a static variable in a class, the variable is declared for that class alone. In your case, DerivedA can't even see staticVar
(since it's private, not protected or public), so it doesn't even know there is a staticVar
variable in existence.