in C++, how to use a singleton to ensure that each class has a unique integral ID?
I have a bunch of C++ classes.
I want each class to have something like:
static int unique_id;
All instances of a same class should have the same unique_id; different classes should have different
问答
阅读(8)