[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Dumb C question
From: |
Theodore A. Roth |
Subject: |
Re: [avr-gcc-list] Dumb C question |
Date: |
Fri, 16 Aug 2002 10:40:28 -0700 (PDT) |
I've done something like this:
enum my_stuff
{
foo,
bar,
baz,
CNT_STUFF
};
Ted Roth
On Fri, 16 Aug 2002, Larry Barello wrote:
:) 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
:)
avr-gcc-list at http://avr1.org