How to use the NSInteger give example and simplecode
+2
A:
NSInteger
is defined like this:
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
It's the same as int
on 32Bit or long
on 64Bit.
gammelgul
2010-05-04 11:40:48
A:
NSInteger a, b, c;
a = 2;
b = 40;
c = a + b;
NSLog(@"THE answer is: %d\n", c);
mouviciel
2010-05-04 11:40:59