avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Dumb C question


From: Larry Barello
Subject: [avr-gcc-list] Dumb C question
Date: Fri, 16 Aug 2002 09:17:34 -0700

I am slogging into the future and learning how to use "enums".  Is there an
elegant way to find out how many items there are in a particular enum?  i.e.

enum eMenuItem
{
    D_this,
    D_that,
    D_TheOtherThing
}

If I say "sizeof(enum eMenuItem)" I just get 2, which of course is the size
of the enum.

Cheers!

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]