assertion failure

Hy,
I have an assigment for my programming class to program a diffusion problem.
i have completed the programming and when i compile it Visual Studio gives no errors. however when i run it, the program crashes en it gives an assertion failure. it says:
Debug Assertion failed
Program: ...
File: c:/Program files/microsoft visual studio 8/vc/include/vector
line: 756
expression: vector subscript out of range
for information on.....

Do any of you have any idea how to solve such a problem or even what it means?

i really need your help,
thanks
closed account (z05DSL3A)
The most likely cause of this error is indexing the vector beyond the number of items it holds.

1
2
3
4
5
6
7
...
vector<int> testVec;
testVec.push_back(0);
testVec.push_back(1);

std::cout << testVec[3];
...


This goes outside the bounds of the vector at runtime.
Hope it helps, if not pot some code.
Last edited on
Topic archived. No new replies allowed.