Quote (carteblanche @ May 25 2012 12:41pm)
Interesting, I had been taught and had read that multidimensional arrays are actually just normal single dimensional arrays of size length*width that are abstracted for the programmer's ease of use and readability. That page though, says that multidimensional arrays
are actually arrays of other arrays.
Though, I still don't fully understand - it said that "the function must know that a is an array of arrays of 7 ints". Why does it need to know this? Shouldn't it just need to know that the datatype is an integer?
If we have an array myArray[3][4], when I pass it to the function the value that's actually passed is a pointer to the first element, correct? So then, if in that function I asked for myArray[1][2], shouldn't it know to go to the element after the pointer it had received, use that pointer to find the array, and then go to the third element of that array? Since it knows that the data being stored are integers, shouldn't it know how far it needs to jump around in memory to access the correct elements? I still don't see why the function cares what the second dimension's size is.