set的erase函数
#include "stdafx.h"
#include<set>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
set<int> st;
st.insert(1);
st.insert(1);
st.insert(2);
st.insert(3);
st.erase(1);//直接删除
st.erase(st.find(3));//找到删除 区间这里不做表达
for(set<int>::iterator it=st.begin();it!=st.end();it++)
{
printf(" %d\n ",*it);
}
return 0;
}