C
Chris Mantoulidis
I can use enums in three ways:
typedef enum { a, b, c, d } ABCD; //this is a TYPE
enum EFGH { e, f, g, h }; //this is a TYPE too
enum { i, j, k, l } IJKL; //this however is a variable...
I believe this happens with structs too, but that's not the point.
Why are there two ways of declaring an enum type??? Isn't one way
enough? Or is the second way more C++-ish?
Thanks in advance,
cmad
typedef enum { a, b, c, d } ABCD; //this is a TYPE
enum EFGH { e, f, g, h }; //this is a TYPE too
enum { i, j, k, l } IJKL; //this however is a variable...
I believe this happens with structs too, but that's not the point.
Why are there two ways of declaring an enum type??? Isn't one way
enough? Or is the second way more C++-ish?
Thanks in advance,
cmad