I am having some problems with enumerations. Lets say for example I have defined a new data type:
[COLOR=blue]
enum
[/COLOR]
Vehicle {SMART = 0, MINI = 1, MAZDA = 2, ACCORD = 3} ;
I know that I can assign each constant a value, and that if none is supplied, the compiler will assign the first constant a value of zero with each constant increasing by a value of 1. …what if I want to print the actual constant name? instead of 2, I want MAZDA instead? Is there a way to do this without strings?