So, I'm just starting to learn C++ and I'd like to start off by saying thank you to all those that created this site. It's been great and the guides are very helpful.
During the course of trying out example code for arrays, I ran into an issue where the code doesn't terminate when expected. In fact, it just goes until my computer gives an error response. So my question is: given the code below, which is a copy of what I have entered and is almost a copy/paste from the example, why doesn't it terminate on its own?
Code:
#include <iostream>
using namespace std;
int main()
{
int x;
int y;
int array[8][8];
for ( x = 0; x < 8; x++ ) {
for ( y = 0; y < 8; y++ )
array[x][y]= x * y;
}
cout<<"Array Indices:\n";
for ( x = 0; x < 8; x++ ) {
for ( y = 0; x < 8; y++ )
cout<<"["<<x<<"]["<<y<<"]="<< array[x][y] <<" ";
cout<<"\n";
}
cin.get();
}
Thanks in advance. I know this is probably really basic stuff, but I only started yesterday.