Alright, so I read through the Arrays tutorial on this website -
Arrays in C and C++ - Cprogramming.com
And so I tried using the tutorial codes -
And when the program is launched, it prints all this-Code:#include <iostream> using namespace std; int main() { int x; int y; int array[8][8]; // Declares an array like a chessboard for ( x = 0; x < 8; x++ ) { for ( y = 0; y < 8; y++ ) array[x][y] = x * y; // Set each element to a value } cout<<"Array Indices:\n"; for ( x = 0; x < 8;x++ ) { for ( y = 0; y < 8; y++ ) cout<<"["<<x<<"]["<<y<<"]="<< array[x][y] <<" "; cout<<"\n"; } cin.get(); }
So.., here is what I don't understand. In the left brackets of each column ( I assume it's where the x's are) shows 0 - 7. But in the right brackets of each column ( I assume it's where the y's are) show 0 in the first column and 1 on the second column, 2 on the third column and so on... That is what I don't understand.
huh ?_? huh <- May someone please give me an easier explanation. Thanks.