The collections covered in this chapter only hold objects. What if you want a collection of floats or ints or pointers to structures? You can wrap common C primitive types in an object. There are two classes that are designed specifically for this purpose. NSNumber holds C number types. NSValue can hold a pointer and some types of structs.
For instance, if you wanted to put the numbers 4 and 5.6 into an array, you would use NSNumber:
NSMutableArray *numList = [[NSMutableArray alloc] init]; [numList addObject:[NSNumber numberWithInt:4]]; [numList addObject:[NSNumber numberWithFloat:5.6]];