Why don't I get an error here? There is no where in the code I initialise the buffer array. Should there not be an error on LINE 22?
Code:
double point[6][3];
double buffer[6][3];
//p1
point[0][0] = 300; point[0][1] = 50; point[0][2] = 0;
//p2
point[1][0] = 150; point[1][1] = 50; point[1][2] = 0;
//p3
point[2][0] = 260; point[2][1] = 150; point[2][2] = 0;
//p4
point[3][0] = 250; point[3][1] = 200; point[3][2] = 0;
//p5
point[4][0] = 160; point[4][1] = 300; point[4][2] = 0;
//p6
point[5][0] = 300; point[5][1] = 300; point[5][2] = 0;
...
for (int j=1;j<5;j++)
{
pDC->MoveTo(buffer[j][0], buffer[j][1]);
pDC->LineTo(point[j][0], point[j][1]);
buffer[j][0] = point[j][0];
buffer[j][1] = point[j][1];
}