Re: Question about "enums"
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Mon, 01 May 2006 07:35:45 +1200
mdh wrote:
Ian Collins wrote:Yes, it sure does in C++.
Assigning any other value to a loop is undefined. Unfortunately C
compilers don't regard this as an error, which renders enums little more
than symbolic constants.
Is this what you mean?
enum months{Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec};
enum months mymonths=14; / * Should really raise an outofbounds
exception ? */
--
Ian Collins.
.
- References:
- Question about "enums"
- From: mdh
- Re: Question about "enums"
- From: Ian Collins
- Re: Question about "enums"
- From: mdh
- Re: Question about "enums"
- From: Ian Collins
- Re: Question about "enums"
- From: mdh
- Question about "enums"
- Prev by Date: Re: question about array out of bound index
- Next by Date: Re: Boost process and C
- Previous by thread: Re: Question about "enums"
- Next by thread: Re: Question about "enums"
- Index(es):