Possible Duplicate:
enum values: NSInteger or int?
What’s the difference between these two enum definitions?
typedef enum : NSUInteger {
Honda = 1,
Chevrolet = 2,
Mercedes = 3,
Volvo = 4
} CarManufacturer;
and
enum {
HarleyDavidson = 1,
BMW = 2,
Yamaha = 3,
Kawasaki = 4,
};
typedef NSUInteger MotorcycleManufacturer;
They are essentially the same thing. The difference is that the first one is more “C++-styled” and the second one is more “C-Styled”.
C++ makes some semantic differences, but you can write C-Style enums (that are present throughout the Cocoa frameworks) for backwards compatibility.