|
From: | Bradley Millman |
Subject: | Re: Enumeration Issue |
Date: | Mon, 30 Oct 2006 17:20:01 -0500 |
User-agent: | Thunderbird 1.5.0.7 (X11/20060911) |
Brad Paulo Matos wrote:
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
[Prev in Thread] | Current Thread | [Next in Thread] |