cout<<(char) theEnumValue
Remember enum values are physically integers. This assumes these enum values are in the printable ascii range. You can ensure that when declaring the enums —
enum BuySellEnum {
B = ‘B’, S = ‘S’, INVALID = ‘X’
};
cout<<(char) theEnumValue
Remember enum values are physically integers. This assumes these enum values are in the printable ascii range. You can ensure that when declaring the enums —
enum BuySellEnum {
B = ‘B’, S = ‘S’, INVALID = ‘X’
};