by Game A Gogo » Fri Feb 04, 2011 9:10 pm
important note
you decalre an array like so: int Array[100][100]
but if you inpute Array[100][100]=1; you will receive an error, that's because the array ID (The number) goes from 0 to 99, thus 100 possible slots
So when you're using an array, always take that in notice.
less important note:
even though Array[0][100]=1; will work, that's because of buffer overflow (I beleive, I'd have to google about this to know for sure), since Array[1][0] is stored after Array[0][99] in memory, the algebra behind the compiler will reach for that array since it doesn't exacly checks what's the maximum of the array size. Unless you're reading from Array[100][100] wouldn't work, because after Array[99][99] there is no more array data in memory (Probably data to inform the array is over).
also, if any of the formentioned information is untrue, please correct me!
Programming games is an art,