0

Hi,

I am getting an error when running a code on linux machine:

"terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Aborted"

In my code i have a 2 dimensional vector defined.

Can someone tell me the possible cause of error.

Thanks

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by guest7
0

Check if you are accessing memory that you have not allocated. Are you using an invalid pointer? Are you using pointers?

Are you referencing an iterator on the end of a vector? (ex: it.end())

Without source code, I cannot give you more advice. I hope that this tips will help.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.