0

I am looking for an method to create and mulidimensional array in objective C.

my requirement is an array similar to

 float array = new float [3*2];
 float array = new float [[3*2][3*2]]; 

these two being in a java format

I would appreciate it if anyone could help me in how i can initialize such arrays in objective-c . Thank you

1

2 Answers 2

2

check this

2D arrays using NSMutableArray

Sign up to request clarification or add additional context in comments.

Comments

0

Objective-C is a superset of C, and any C code is valid Objective-C as well - so, this is a link to creating multidimensional arrays in C: Wikipedia's Article: C syntax - Multidimensional arrays

However, if you're looking for the Objective-C way to do it, that would be to use NSMutableArray or NSArray.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.