Witam
Obecnie próbuję stworzyć dynamiczną tablicę XMMATRIX, kompilacja przebiega prawidłowo, jednak po uruchomieniu otrzymują komunikat:
Unhandled exception at 0x01230AAA in PRT.exe: 0xC0000005: Access violation reading location 0x00000000.
Przed main:
short const int EKx = 10;
short const int EKEx = 6;
short const int EKCx = 3;
short const int EKy = 1;
XMMATRIX ** menuU = new XMMATRIX * [EKx + 1 + EKEx + 1 + EKCx + 1];
W main:
for (short int DM = 0; DM < EKx + 1; DM++){
menuU[DM] = new XMMATRIX [EKy];
}
menuU[0][0] = XMMatrixIdentity();
menuU[0][0] = XMMatrixScaling( BlokY, BlokX, 1 ) * XMMatrixTranslation( 1, 1, 0);
Błąd nie występuje tylko w momencie gdy:
menuU[0][0] = XMMatrixIdentity();
menuU[0][0] = XMMatrixScaling( BlokY, BlokX, 1 ) * XMMatrixTranslation( 1, 1, 0);
Zamienię na:
menuU[1][0] = XMMatrixIdentity();
menuU[1][0] = XMMatrixScaling( BlokY, BlokX, 1 ) * XMMatrixTranslation( 1, 1, 0);
Co jest przyczyną tego błędu?