Multidimensionality Arrays indirect interaction
I extracted the problem, I don't understand why cout <Array [0] [8] writes 2 instead of 1.
http://gyazo.com/d159d3ea97b07f1551605daacd631703
#include <iostream>
using namespace std;
int main()
{
int Array[8][8];
Array[0][8] = 1;
Array[1][0] = 2;
cout << Array[0][8] << endl;
system("pause");
return(0);
}
source to share
It looks to me like the array assigned this type:
An element in a two-dimensional array is accessed using indices, that is, the row index and the column index of the array. For example:
type arrayName [ x ][ y ];
Where type can be any valid C ++ data type and arrayName will be a valid C ++ identifier.
A two-dimensional array can be thought of as a table with x number of rows and y number of columns. A two-dimensional array a containing three rows and four columns can be shown below:
Thus, each element in array a is identified by an element name of the form a [i] [j], where a is the name of the array and i and j are indices that uniquely identify each element in a.
int val = a[2][3];
source to share