Hello all,

Guess I have an enumeration:
enum xpto {one, two, three};

How can I compute the number of elements in this enumeration?
I could in this specific case do:
enum xpto {one, two, three, NUMELEMENTS};

and each time I add an element I add it _before_ NUMELEMENTS, still
being this a constant during runtime (don't think there's a way to ad
an element during runtime) there could be a compiler specific way to do
this, right? Is there any?

Regards,

Paulo Matos

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to