Quote:
Originally Posted by wireties
How members of an array are stored and accessed is a function of the programming language. It is not something one should worry or argue about since the language will reference and de-reference everything for you. "Row" and "Column" mean nothing to the compiler. Notation has nothing to do with the physical location since memory is laid out so one accesses word-sized elements in sequence. In C and C++ it is really done with pointer arithmetic.
|
That is exactly what we said! We were trying to convince our teacher that you don't actually store these numbers in little ordered cells! We could say that when you create a Matrix[][] the first brackets are potatoes and the second are tomatoes and it would still work. It really frustrates me that my so called AP Computer Science teacher hasn't taught this since haskell, had to learn Java over the summer (he pronounces it as Jaiva, it can get irritating), and said, and I quote, "Java is the most popular programming language because three billion devices sounds like a lot". He just makes me want to smash my head into a wall. At least he got us 4 megabyte jumpdrives!