Jump to content

Multi layered arrays


x忍者x
 Share

Recommended Posts

Can someone please explain to me in regular english what the *&^% a Multi layered array is. I googled it and it all looks like a forieng language.

From what I understand a Array, first depends on what kind (integer, string, real, ect) and it starts at 0 and fills one memory space with a variable, so like exampleCode[50] the 50 means that is how many slots their is to put data.. but what is a multi layer array?

Link to comment
Share on other sites

Yes, I apologize, I mean multi dimensional arrays such as whateever[5][10][1000]

and you said an array within an array?

so a 3d array would be an array that has another array within that, and then another array deeper then that one?

so it is like an array with class?

so like the first array could be the student name

the next array within that one could be their GPA

the next one within that one could be their test scores that created the GPA

and since it is an array you can compare all of the students scores and names and GPAS?

Link to comment
Share on other sites

*WHY is every answer have to do with googling it*

Nobody can just post a simple answer? I also want to know about multi demensional arrays. That is what some ninja told me.

I think I will keep the ninja tradition going until I am fully aware of arrays.

Link to comment
Share on other sites

Multi dimensional arrays are exactly what they sound like.

A standard array, MyArray[], has one dimension. It is a line of variables.

A two-dimensional array, MyArray[][] is an array of arrays. Each element in the array is in turn another array. It's a grid of variables.

A three-dimensional array, MyArray[][][], is a two-dimensional array of arrays. Each element in the 2-dimensional array is another array. It's essentially a cube of variables.

Link to comment
Share on other sites

Multi dimensional arrays are exactly what they sound like.

A standard array, MyArray[], has one dimension. It is a line of variables.

A two-dimensional array, MyArray[][] is an array of arrays. Each element in the array is in turn another array. It's a grid of variables.

A three-dimensional array, MyArray[][][], is a two-dimensional array of arrays. Each element in the 2-dimensional array is another array. It's essentially a cube of variables.

What's gets really interesting is when you define a multiple dimesion array as part of a structure which itself is then defined in an array.

Then if you're really screwed in the head mix in some mixed Little Endian/Big Endian DWORDS, of course you're working with the whole word but the individual bits! Yeah it's great when you finally realize "Bit 0" is the middle.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...