我有一个类似下面的矢量
vector<unsigned int> myvector;
vector<unsigned int>::iterator it;
//fill it
for (i=1; i<=10; i++) myvector.push_back(i);
//I want delete first one
it = myvector.begin();
myvector.erase(it++);
//I want to know if I am in last element
if(it != myvector.end())
cout << "a test";
但是在比较表达式中我的程序崩溃了。为什么呢?