You've got undefined behaviour there, because you allocate 10 chars for data, but actually you copy 11 ("hellohello" is 11 characters when you include the terminating null character). Also, I have provided the reason below why your code is not working.
–
dreamlaxAug 9 '10 at 6:26

Thank you very much! [lstPack addObject:[NSValue valueWithPointer:pack]] is correct. But when I use Package *p = (Package *)[lstPack objectAtIndex:0]; to get the pack, the result is that the p->data is nil.How can I get it correct?
–
lqfAug 2 '10 at 8:45

The allocator to use for the array. Providing NULL here means to use the default allocator.

The limit on the size of the array. 0 means that there is no limit, any other integer means that the array is only created to hold exactly that many items or less.

The last parameter is a pointer to a structure containing function pointers. More info can be found here. By providing NULL here, it means that you don't want the array to do anything with the values that you give it. Ordinarily for an NSMutableArray, it would retain objects that are added to it and release objects that are removed from it¹, but a CFMutableArray created with no callbacks will not do this.

¹ The reason that your code is failing is because the NSMutableArray is trying to send retain to your Pack struct, but of course, it is not an Objective-C object, so it bombs out.