I am trying to figure out if there is a better way to test if a string being entered at the command line is a valid enum entry for a C program.
Is there a better way to test the entries in an enum instead of saying:
if((!strcmp(string, "NUM0")) && (!strcmp(string, "NUM1")))
{
printf("Invalid entry\n");
return(EXIT_FAILURE);
}