| dekeenfrance (64) | |||
|
Hello, I am writing a program of scientific simulation on Visual Studio. In my simulation there is a big vector of pointers who point to a big number of objects each one consists of some vectors. When I run the simulation, sometimes it works normally, sometimes it throw an exception by citing "Vector iterator out of range" or "vector iterator not dereferencable". The code is very long so I cannot put it here. I just put a fraction of the debug file called "vector" automatically made by Visual Studio. Because I don't know what it means and how I can find my error through this. Could someone knows this please tell me how to debug this error? Thanks in advance.
| |||
|
|
|||
| cire (2345) | |
| The error is a logic error in your code, not that of std::vector. | |
|
|
|
| dekeenfrance (64) | |
| Could you please explain a bit more? | |
|
|
|
| toum (203) | |
|
The code you're showing us is the part of code of std::vector that displays an error if ever the call to the iterator's operator+=() causes the iterator to be out of range. You need to find the part of your code that tried to increment an iterator just before the error occured. | |
|
|
|