I want to make a 2D array like this
[[1,2,3],[94,22],[2,4,6],[1,3,5,6]]
What is the best way to do this for iOS using NSMutable arrays
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 cannot create a static 2D array with differently sized rows.
Perhaps you can use NSArrays instead of C arrays to achieve this.
edit:
This is tedious, but you can try:
And so on for each array, then