I'm new to objective C programming. It's a little different from C/C++.
I would like ot use the NSArray/NSMutableArray to store numbers. Apparently, I don't know what I'm doing, because I can't get my values. I'm only getting what looks like a pointer to my object. Pretend I'm 5-years-old. What can I do to retrieve my number(s)? I do appreciate anyone's help in advance.
NSMutableArray *myArray;
NSInteger iNumber = 1;
NSObject *obj;
myArray = [[NSMutableArray alloc] init];
[myArray addObject:[NSNumber numberWithInt:iNumber]];
obj = [myArray objectAtIndex:iIndex];
[myArray removeAllObjects];
[myArray release];
I would like ot use the NSArray/NSMutableArray to store numbers. Apparently, I don't know what I'm doing, because I can't get my values. I'm only getting what looks like a pointer to my object. Pretend I'm 5-years-old. What can I do to retrieve my number(s)? I do appreciate anyone's help in advance.
NSMutableArray *myArray;
NSInteger iNumber = 1;
NSObject *obj;
myArray = [[NSMutableArray alloc] init];
[myArray addObject:[NSNumber numberWithInt:iNumber]];
obj = [myArray objectAtIndex:iIndex];
[myArray removeAllObjects];
[myArray release];