/* initialise triangular matrix to zero */
for(i =0; i < dimention; ++i)
for(j =0; j <= i+1; ++j)
lower_tri[i][j] = 0;
The above causes buffer overrun. The inner loop should be < not <=
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343