How can I create NSMutableArray of Structures?
I can create an array of Structures in standard-c but am running into problems in objective-c.
standard-c:
struct person people[10];
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to copy each
structinto an NSData or NSValue object in order to place it in an NSArray.You should understand the difference between stack and heap and how to work with pointers (or be ready to learn), otherwise you will see a lot of EXC_BAD_ACCESS (or worse, no exceptions, just mysterious garbage data).