I have a Problem. I have a huge c++-project that I change at a few points to meet my requirements. I load more data than expected and at some point in this program there is a new vector allocated with the size of the number of data multiplied by another number.
vector = new real[data.size()*28];
Here I get the error message:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
because I can't allocate that much space . I can't change this vector because it is used in many different parts in the program and it would be very difficult and (for me) maybe impossible to fit the rest of the program to a new definition here.
What can I do that I can use this vector but get my large dataset into it?
Btw: I use eclipse, maybe I can increase the size of possible space to allocate in eclipse itself?
Thank you!