I am fairly new at object oriented programming (but am starting to pick up fairly quickly), and am working on an application for the iphone. I need to make a multidimensional array, (10,000 or more rows, 8 collums) ordered as such:3 collums should contain boolean values, one should contain an integer, two need to hold GPS coordinates (usually have a decimal, like 62.422342), one needs to hold a 30 character string. is there an easy way to create such an array, and if so, to define the array elements prior to user interation?
You might want to make each row an object, and keep an NSArray of those objects. Each "column" would be a property on the object. This would be a good choice if each row actually does represent an object.
Otherwise you could have an NSArray of NSArrays to represent the 2D array. Not a perfect solution, because it's possible to have rows/columns of different lengths, but it would do.
You could always roll your own, and make a kind of "Table" class that acts as a 2D NSArray and enforces correct row/column length.
You should maybe have a look at Core Data and store your data in a database. I'm currently reading Beginning iPhone 3 Development and it's got a chapter about Core Data. It doesn't go into very much detail, but is a good introduction and should be enough to get started.