Array of doubles objective c

arrays, double, nsmutablearray, objective-c

Solution

You can only put objects into an `NSMutableArray`. But you can wrap your doubles in `NSNumber` like so:

NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:0];
[array addObject:[NSNumber numberWithDouble:0.12345]];
[array addObject:[NSNumber numberWithDouble:5.43210]];

Problem

Is there something like `NSMutableArray` that will take doubles directly without putting them inside the `@""`?

Original source