Skip to content

Instantly share code, notes, and snippets.

@Nub
Created June 6, 2013 20:47
Show Gist options
  • Select an option

  • Save Nub/5724798 to your computer and use it in GitHub Desktop.

Select an option

Save Nub/5724798 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
typedef enum Gender {
Male,
Female
} Gender;
const char* genderNames[] = {
"Male",
"Female"
};
int main(int argc, char *argv[]) {
@autoreleasepool {
Gender g = Male;
NSLog(@"%s", genderNames[g]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment