Using C Arrays
UInt8 MyArray[10];
MyArray[0] = 0x00;
MyArray[1] = 0x01;
int LengthOfMyArray = length:sizeof(MyArray);
Using C Arrays
UInt8 MyArray[10];
MyArray[0] = 0x00;
MyArray[1] = 0x01;
int LengthOfMyArray = length:sizeof(MyArray);
[SomeArrayName sortUsingSelector:@selector(compare:)];
(more...)
Arrays in Objective-C do not contain the objects that belong to it, they hold a pointer (reference) to each object in the array. So when you use :addObject you are simply storing the address of that object inside the array. This means that you can have different types in a single array. This is a key difference to other languages where an array can only hold 1 object type. (more…)