How should I declare a long in Objective-C? Is NSInteger appropriate?

后端 未结 5 728

I see NSInteger is used quite often and the typedef for it on the iPhone is a long, so technically I could use it when I am expect int(64) values.

5条回答
  •  余生分开走
    2021-01-12 12:34

    IIRC, long on the iPhone/ARM is 32 bits. If you want a guaranteed 64-bit integer, you should (indeed) use int64_t.

提交回复
热议问题