1

I have some doubt in enum in objectiveC understanding

enum
{
    kTagWord ,
    kTagSprite ,
    kTagSpriteManager ,
    kTagSpriteError ,

};

let's say i have this enum, what does it mean? i really appreciate any helps

James Raitsev
  • 92,517
  • 154
  • 335
  • 470
Rocker
  • 1,467
  • 5
  • 14
  • 20

1 Answers1

3

It defines an un-named enum type with the specified values, which basically just means you are defining a series of constants.

By default, the first value of an enum will be 0 (so kTagWord is 0 in your case) then 1, 2, etc.

Mike Weller
  • 45,401
  • 15
  • 131
  • 151