I am new with C, and I found enum really nice. My programs gets a strings, and uses the enum to do cases, and then (sometimes) I need to send back a string that matches one in a enum table. Is there a way to do it with enums or should I use lookuptables? Something like this
typedef enum    {
    string1,
    string2,
    string3,
    string4,
    BADKEY                
} strings;
function(string1); //will send the integer, 
                   //but would love to be able to send the string.
function(char *string) {
...
}
 
     
     
    