Hi, I need to compare an enum as a whole to one string, so the whole contents of the enum is checked.
Wanted something like:
NSString *colString = [[NSString aloc] initWithString:@"threeSilver"];
typedef enum {
oneGreen,
twoBlue,
threeSilver
}numbersAndColours;
if (colString == numbersAndColours) {
//Do cool stuff
}
But obviously I can't do that, maybe a struct... sorry, I'm new to C please help?
BTW: I know NSString isn't C, but figured this question was more C, than Obj-C.
Thanks