enum cpp list in string code example
Example: c++ enum to string
//There really is no beautiful way of doing this.
//Just set up an array of strings indexed by the enum.
//If you do a lot of output, you can define an operator<< that-
//-takes an enum parameter and does the lookup for you.