Unhandled exception at 0x008420fa in mlp.exe: 0xC0000005: Access violation writing location 0x0000007f.
void MLP::loaddata(){ const char *trn_file="Winners.trn"; const char *tst_file="Winners.tst"; ifstream Trn(trn_file); ifstream Tst(tst_file); for(int i= 0;i<NumTrn;i++) { Trn>>TrainLabels[i]; for(int j=0;j<NumFe;j++) Trn>>TrainData[i][j]; } for(int i= 0;i<NumTst;i++) { Tst>>TestLabels[i]; for(int j=0;j<NumFe;j++) Tst>>TestData[i][j]; }
for (int i= 0; i<NumTrn; i++){ for (int j= 0;j<NumFe;j++) //input cvSetReal2D(&TrnData, i, j, TrainData[i][j]); //Output cvSet1D(&TrnLabels, i, cvScalar(TrainData[i][NumFe])); } //for test matrix for (int i=0; i<NumTst; i++){ for (int j=0;j<NumFe;j++) //input cvSetReal2D(&TstData, i, j, TestData[i][j]); //Output cvSet1D(&TstLabels, i, cvScalar(TestData[i][NumFe])); } // CALCMLP( TrnData, TrnLabels, TstData, TstLabels); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)