I have a huge number of arrays, each with a series of numbers each referring to an LED on a strip. I want to be able to address each one by a number, so the logical solution to that for me was to make the whole thing into an array. Can that be done, or is there a better work around that can be implemented?
|
Yes you can have arrays inside arrays. The array would be declared as:
where x is the number of rows and y is the number of columns. The example below declares and initializes a 2D array with 3 rows and 10 columns:
To access the value of 27 (and save it into myValue):
|
|||
|