iphone - creating integer array -
Hello, I'm a new iPhone programmer. I know that we can create an array of integers, array of stars ... etc. Like different C ++ if yes then how .... I have read about the example given on this site, but this is the style of array .... please reply
NSArray
is the standard array square in cocoa / cocoa touch. It contains objects, but not priorities.
You can wrap an integer by wrapping it with an object in an array with the NSNumber
object:
NSNumber * myInt = [NSNumber NumberHome: 1] ;
Then you can store it in an array:
NSArray * myArray = [NSArray arrayWithObject: myInt];
Comments
Post a Comment