An assertion is a debugging facility.
it generally looks like this assert (expression that should be truefor program to continue)
Simple silly Example:
1 2 3 4 5 6 7 8 9 10 11
#include <assert.h>
int main()
{
int a = 3;
assert(a > 5);
}
The assert on line 7 - says that at that point in the program - the variable a should be greater than 5.
If the variable a is greater than 5 (true) then the program will continue, if a is < 5 the epression will be false and the
program will be halted with an assertion error.
The program file and line within the file will usually be displayed for your
information.
_Myt is an iterator. So this code is the += operator overload for an iterator.
So it looks as though you are trying to increment an ininitialised vector iterator.
That is to say that you have not set the iterator to point to a vector correctly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
vector<int> myvec; //vector variable
myvec.push_back(3); //put some stuff in the vector
myvec.push_back(6);
myvec.push_back(5);
myvec.push_back(9);
myvec.push_back(21);
vector<int>::iterator itr; //make an iterator
//itr+=3; //ERROR - atttempting to use iterator before it is initialised.
itr=myvec.begin(); //CORRECT - iterator initialsed
itr+=3; //OK