First thing to understand is this: due to the nature of C/C++ arrays, "2D" array is no different from "1D" array, as well as the array of any other rank. The indexing of an array element (of a non-
jagged array) using multiple indices is not more that
syntactic sugar. The same very array can be considered as "2D" or "1D". Please see:
http://www.cplusplus.com/doc/tutorial/arrays[
^].
Pay attention for the chapter "Multidimensional arrays".
See also:
http://en.wikipedia.org/wiki/Syntactic_sugar[
^].
This way, the access to array is neither row-wise nor columns-wise. It is always "element-wise". Change one of the two indices and keep another index constant, and you move along one column, change another, and you move along one row. (Or visa versa: it depends on what you call row and columns. :-))
—SA