Multidimensional array or something similar

Discussion in 'iOS Programming' started by portem1, Jan 19, 2011.

  1. macrumors newbie

    Joined:
    Jan 18, 2011
    #1
    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?
     
  2. macrumors regular

    Joined:
    Jan 13, 2011
  3. macrumors 65816

    testcard

    Joined:
    Apr 13, 2009
    Location:
    Middle England
  4. macrumors regular

    Joined:
    Jan 13, 2011
    #4
    He's actually on the lowest level of object-oriented programming learning
     
  5. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    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.
     
  6. thread starter macrumors newbie

    Joined:
    Jan 18, 2011
    #6
    Thanks
     

Share This Page