hello,
I think the best is to create an array of structure like that :
typedef
{
int iEnum;
char *psText;
}TG_EnumText, *PTG_EnumText;
static TG_EnumText gs_EnumText[]=
{
{value1, "Name1" },
{value2, "Name2" },
};
After that you make a function f( value ) that returns the good string from the gs_EnumText variable. Be carreful if you have duplicates values.