I need some help on ENUM in C.It would be great if I get the reply soon.
My pbm is ,I have a string for eg : data = abc".I want to convert this into int and should map with the enum value that is defined.
but when i print the result it prints as "-2......." some junk values...
I couldnt find the reason why the number is displayed.
This is how i coded ...
//defined in header file
abc = 1,
//main code in a function....
int temp = (int)(exeCmd.command)
case abc : perform some operation;
case def :...
default : break;
so whats the problem here and someone can help me out if possible..