Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RutgerB

macrumors member
Original poster
Jul 13, 2008
32
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.