错误程序:
#include <iostream>
#include <vector>
using namespace std;
struct A
{
int x;
A(int y) {x = y;}
};
int main()
{
A a(11217);
vector<A> V;
V.push_back(a);
vector<A>::iterator it = V.begin();
A *p = it;
return 0;
}#include <iostream>
#include <vector