Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4249734
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:26:09+00:00 2026-05-21T04:26:09+00:00

Im looking for an example of multidimensional arrays. I have an array of thumbtails

  • 0

Im looking for an example of multidimensional arrays. I have an array of thumbtails (9 for example) and a tablecellview of 4 thumbs pre row, giving me 3 rows. I want to create a new multidimensional array which will hold the 3 rows each row containing 4 arrays.

Ive looked at many example for the past 3h but they all seem to suggest to use C-style coding and im not sure how to go about initialising them or if i need to release. Plus im using this in a tableview so im not sure if ill need to use NSarray or ill be able to get away with C-style array. Any suggestions gratefully appreciated.

thumbnailarr[0][0] = 'img1.png';
thumbnailarr[0][1] = 'img2.png';
thumbnailarr[0][2] = 'img3.png';
thumbnailarr[0][3] = 'img4.png';

thumbnailarr[1][0] = 'img5.png';
thumbnailarr[1][1] = 'img6.png';
thumbnailarr[1][2] = 'img7.png';
thumbnailarr[1][3] = 'img8.png';

thumbnailarr[2][0] = 'img9.png';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:26:10+00:00Added an answer on May 21, 2026 at 4:26 am

    A multidimensional array is essentially an array of arrays, an NSArray can have NSArrays as its contents. For example:

    NSArray *thumbs= [NSArray arrayWithObjects:
                              [NSArray arrayWithObjects: @"img1.png",@"img2.png",@"img3.png",@"img4.png",nil],
                              [NSArray arrayWithObjects: @"img5.png",@"img6.png",@"img7.png",@"img8.png",nil],
                              [NSArray arrayWithObject: @"img9.png"],nil];
    

    access like this:

    [[thumbs objectAtIndex:i] objectAtIndex:j]; //same as thumbs[i][j]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multi-dimensional array similar to the example below that I want to
I have very long multidimensional array that have many sub arrays. I would like
looking at this example of the jquery ui slider http://jqueryui.com/demos/slider/#steps i want to be
I was looking for an example how to store a large text array (
I have a string which represents a multidimensional array in the format: [[A, a],
In C++/CLI, you can specify the following for multidimensional arrays. array<int, 2>^ Foo =
Is it possible to turn a column of a multidimensional array to row using
I have a view in which I search for products. I'm for example looking
i have a multidimensional array: $image_path = array('sm'=>$sm,'lg'=>$lg,'secondary'=>$sec_image); witch looks like this: [_media_path:protected] =>
Looking at some example code and come across some zero-size array allocation. I created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.