HI.

Is there any way I can use inheritance in order to enforce my derived class use a static member?
Like:

Code:
class Base {
  ...
}


class Derived : public Base {
  public:
    static int _classNum;
}
So that every derived class would be enforced to use a static member?
I thought about pure virtual methods (getter/setter) in the Base class,
but they won't assure that the derived classes are defining the variable as static.

Is there a logic solution for that (I got it as an assignment, with this constraint)