I've been able to find a post citing that the C99 standard requires a 0 ordinal number. But I know C++ ignores several things in the C99 standard. And I've also been able to find a post witnessing the compiler using an ordinal value of 1, something I also seem recall seeing, though I can't say how long ago that was.
I would really like to see an answer that confirms this for C++, but I'd also like to know if an ordinal 0 holds even if I specify a value in the middle of an
If I have an [code]enum[/code] that does not assign numbers to the enumerations, will its ordinal value be 0? For example: [code]enum enumeration { ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE }; [/code] I've been able to find a post citing that the C99 standard requires a 0 ordinal number. But I know C++ ignores several things in the C99 standard. And I've also been able to find a post witnessing the compiler using an ordinal value of 1, something I also seem recall seeing, though I can't say how long ago that was. I would really like to see an answer that confirms this for C++, but I'd also like to know if an ordinal 0 holds even if I specify a value in the middle of an [code]enum[/code]: [code]enum enumeration { ZERO, ONE, TWO, THREE = 13, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE }; [/code]