Most likely triangle
is not declared with enough memory for the indices you use. If row==column==8
then you need to declare it like this:
double triangle[9][9];
Because C++ uses zero-based indices this allows for indices in the range 0 to 8 inclusive. Most likely your declaration is like this:
double triangle[8][8];