Store numbers in array

Discussion in 'Mac Programming' started by RutgerB, Jul 13, 2008.

  1. RutgerB macrumors newbie

    Joined:
    Jul 13, 2008
    #1
    Hi


    I'm new to xcode and now after reading a number of tutorials I'm trying to write my first application.

    My question is: how can I store numbers in an array. I have this code right now:

    Code:
    NSMutableArray *myArray = [NSMutableArray array];
    [myArray addObject:@"test1"];
    [myArray addObject:@"test2"];
    How can I change this code so that the array will store numbers. Or should I just store the numbers as strings?


    I'm using xCode with cocoa objective-c.


    Thanks for helping me!

    -Rutger
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX

Share This Page