PDA

View Full Version : Multidimensional array or something similar




portem1
Jan 19, 2011, 06:32 AM
Hi again, i'm new in objective c so, i again have problem...
It is multidimensional array or something similar in this language? I'm getting info from webservice witch i want to store in array. In c# it could look like:

array[0][0] = name
array[0][1] = surname
array[0][2] = age
array[1][0] = name1
array[1][1] = name2
array[1][2] = name3

and etc. Then i Need second person name i could just write array[1][0]. So how to do ir in objective c?



Steven Jobson
Jan 19, 2011, 06:40 AM
What exactly are you asking. Be clearer

testcard
Jan 19, 2011, 06:45 AM
Are you from the future?

Steven Jobson
Jan 19, 2011, 06:46 AM
Are you from the future?

He's actually on the lowest level of object-oriented programming learning

robbieduncan
Jan 19, 2011, 07:23 AM
You can use multidimensional C arrays as normal. Objective-C is a pure superset of C. Or you can use a NSArray (or NSMutableArray) which contains NSArray (or NSMutableArrays) at each index.

portem1
Jan 20, 2011, 01:42 AM
You can use multidimensional C arrays as normal. Objective-C is a pure superset of C. Or you can use a NSArray (or NSMutableArray) which contains NSArray (or NSMutableArrays) at each index.

Thanks