Anyway, 'a' in the enum is an identifier. 'a' you want to see is a character (or string). These to don't have much in common. You can't go from one to another.
A thing you could do is enum letters { a = 'a', b,c,d,e }; and cout << (char)a_letter;. This simply sets the value of identifier 'a' to the ascii code of character 'a'. This would not work for strings though.
Though you really shouldn't do this. Enums are a kind of integer constants used when their actual values are irrelevant (as long as they are different). Conversions form or to integers go against this logic. Use simple constants for that.
#include <iostream>
usingnamespace std;
enum letters { a='a', b='b',c='c',d='d',e='e' };
int main ()
{
letters a_letter;
int i;
for (i = 0; i< 5; i++)
{
a_letter = (letters)i;
cout << (char)a_letter;
}
}
This doesn't work as expected, I get non-abcde ASCII characters.
I thought this could be a nice way to automatically fill out the pieces names (chars) in relation to their game value, but I was wrong.
Thank you very much for your help, I'll come back to this some rainy day.