hi i am new iphone programmer i want to know that can we create array of integer,array of strings....etc seperatly like c++ if yes then how.... i have read about the example given on this site but that is c style of array.... please reply
+1
A:
NSArray
is the standard array class in Cocoa/Cocoa Touch. It can contain objects, but not primitives.
You can store integers in an array by wrapping them with an NSNumber
object like so:
NSNumber *myInt = [NSNumber numberWithInt:1];
Then you can store it in an array like so:
NSArray *myArray = [NSArray arrayWithObject:myInt];
Jasarien
2010-08-05 09:19:28
i tried this one but problem is that i want to store man values in it but it does not supporting
Online
2010-08-06 04:43:28