Folgender Code :
numberOfSamples = i1\_GetNumberOfAvailableSamples();
TRACE("\n Number of fields recognized: %d\n", numberOfSamples);
**int\* naPlace= new int[(numberOfSamples-1)];**
double dFoundBestLab;
int nFoundPatchCount;
int nFoundPatchYes;
int nRowFound;
int nforward;
m\_pDocMK = m\_pCSpectralDoc-\>getData(0);
m\_pDocMKDev = m\_pCSpectralDoc-\>getData(1);
m\_pDocMKMes= m\_pCSpectralDoc-\>getData(2);
m\_pDocMKDelta= m\_pCSpectralDoc-\>getData(3);
for(i = 0 ; isetLAB(i,spectrum[0],spectrum[1],spectrum[2]);
naPlace[i]=m\_pDocMK-\>findBestLab(spectrum[0],spectrum[1],spectrum[2]);
}
for (int nirow=0; nirow getPatchYcount();++nirow)
{
if ( ( naPlace[0] == (nirow\*m\_pDocMK-\>getPatchXcount()) ) && ( naPlace[1] == (1+(nirow\*m\_pDocMK-\>getPatchXcount()) ) ) && ( naPlace[2] == ( 2+(nirow\*m\_pDocMK-\>getPatchXcount()) ) ) && ( naPlace[3] == ( 3+(nirow\*m\_pDocMK-\>getPatchXcount()) ) ) && ( naPlace[4] == ( 4+(nirow\*m\_pDocMK-\>getPatchXcount()) ) ))
{
TRACE("\nFOUND ROW %d Forward",nirow);
nRowFound = nirow;
nforward = 1;
}
if ( ( naPlace[(m\_pDocMK-\>getPatchXcount()-1)] == (0 +(nirow\*m\_pDocMK-\>getPatchXcount())) )&& (naPlace[(m\_pDocMK-\>getPatchXcount()-2)] == (1+(nirow\*m\_pDocMK-\>getPatchXcount())) ) && (naPlace[(m\_pDocMK-\>getPatchXcount()-3)] == (2+(nirow\*m\_pDocMK-\>getPatchXcount())) ) && (naPlace[(m\_pDocMK-\>getPatchXcount()-4)] == (3+(nirow\*m\_pDocMK-\>getPatchXcount())) ) && (naPlace[(m\_pDocMK-\>getPatchXcount()-5)] == (4+(nirow\*m\_pDocMK-\>getPatchXcount())) ))
{
TRACE("\nFOUND ROW %d BACKWARD",nirow);
nRowFound = nirow;
nforward = -1;
}
}
// Enter Data
**delete[] naPlace;**
ergibt folgende fehlermeldung
DAMAGE: after Normal block(#10185) at 0x0032FF58
Geh ich mit der Maus im Debug modus über die pointer variable, zeigen sowohl new als auch delete denselben pointer bei 0x0032FF58
Wer Weiss Was !!! da los ist
MFC Visual C++
Mfg Sascha