Does anyone know an easy way to do array's of arrays? I'm not 100% sure this is the thing I want though because I just need a simple way to make a loop able to change the list it's comparing. I have the loop done, I just can't figure out how to make the array change, so i was thinking there might be a way to just do arrays of arrays.
When you allocate an array, it basically tells the compiler "I want an array of N objects of type T". The compiler will lay those out in memory like so:
| 0 | 1 | 2 | 3 | 4 |
Then when you index into the array, it takes the address of the first element of the array and adds the index to that address (it moves the index by the appropriate size of the data type, e.g. 1 byte for char, 4 bytes for a 32-bit int, etc..)