Could someone explain what this means:
terminate called after throwing an instance of 'std::bad_alloc'
The program inserts rows into a matrix represented as 1D vector. It works for smaller instances of the problem, but
on larger instances, this is thrown. Does it lack a memory?
That was very elaborate. Anyone else?
Originally Posted by Brafil
You asked a yes or no question so don't expect a paragraph explanation.
Originally Posted by onako
Just to "elaborate", yes, the machine or way that you are allocating cannot allocate the memory, in other words, it's not available.
xD It means you probably ran out of memory. Larger instances, as you called them, require simply more memory, more than you have.
Beware, if you allocate the "things" more than once, memory consumption will grow much faster. delete the ones that you don't need. For any else advice, you can post snippets of your code here.