Assuming I have a global counter to count all derived classes,
extern int classTypeCounter=0;
how can I make them increment the global counter
class A
{
static void increment();
};
without instantiating/using them? Can this global counter have the number of derived classes before any function/class is used?