Why doesn\'t this please the compiler? Casting is supposed to work like in C as I can read here How to cast an object in Objective-C.
[p setAge:(NSNumber*)10
NSNumber *yourNumber = [NSNumber numberWithInt:your_int_variable];