Why is there an NSInteger?

后端 未结 3 537
-上瘾入骨i
-上瘾入骨i 2020-12-09 17:48

If NSInteger is just like a regular int then why does it exist and what is its purpose in being called NSInteger?

I\'m new to Mac OS X prog

3条回答
  •  醉梦人生
    2020-12-09 18:17

    Other than the typedef being different on different systems (long on 64-bit systems, int on 32-bit), there isn't much of a reason.

    Arguably, it gives the impression that an NSInteger is an object, when it's not.

提交回复
热议问题