I wrote a code to build a matrix with specific calculations. When I'm using 3000 elements works well ... But I did a test with 150.000 (150.000 x 150.000) and I had problems.
" terminate called after throwing an instance of 'std::bad_alloc' "
I'm copying the code part of the problem:
void buildMatrix(ofstream &myfileOutSubsetZ, ofstream &myfileOutSubset,ofstream &myfileOut,ofstream &myfileLog,vector<string> &vetorInd)
float **AAA = 0;
AAA = new float *[vetorInd.size()];
AAA[i]= new float [vetorInd.size()]; // PROBLEM!
I captured the exception:
Can you help me please?
|All times are GMT +5.5. The time now is 02:43.|