I would like to define something like that in a global header:
namespace FruitSaladApp
{
enum Fruits { Banana, Apple, Orange, Kiwi };
const char * fruitStrings[] { "Banana", "Apple", "Orange", "Kiwi" };
}
I use header guards so that it gets defined only once per compilation unit.
I would like to keep the definition beside the enum to avoid getting them "out of sync" upon adding/deleting/modifying items, so that doing fruitStrings[Banana] is coherent and safe.