STL的东西好多好杂呀~
2016-07-14 09:50
281 查看
1.高效地使用STL:http://www.cnblogs.com/me115/p/4596543.html
2.一些string的算法:http://blog.csdn.net/hkx1n/article/details/6169130
3.STL中erase()小心使用 : http://blog.csdn.net/yangruibao/article/details/9040045 ; http://www.cnblogs.com/kex1n/archive/2011/12/06/2278505.html (for map)
4.C++STL中map.erase(it++)用法原理解析 : http://m.blog.csdn.net/article/details?id=50950843
高能预警__下面下面啦~
set<int> se;
set<int> :: iterator it;
int main()
{
for (int i=0; i<10; i++)
{
se.insert (i);
}
it = se.find(7);
if (it == se.end())
{
se.erase (it); //it这个迭代器只是失效了,并没有丢哦~
}
else
{
cout << "ohehe~~ " << endl;
}
for (it = se.begin(); it!=se.end(); it++)
{
cout << *it << endl;
}
return 0;
}
2.一些string的算法:http://blog.csdn.net/hkx1n/article/details/6169130
3.STL中erase()小心使用 : http://blog.csdn.net/yangruibao/article/details/9040045 ; http://www.cnblogs.com/kex1n/archive/2011/12/06/2278505.html (for map)
4.C++STL中map.erase(it++)用法原理解析 : http://m.blog.csdn.net/article/details?id=50950843
高能预警__下面下面啦~
set<int> se;
set<int> :: iterator it;
int main()
{
for (int i=0; i<10; i++)
{
se.insert (i);
}
it = se.find(7);
if (it == se.end())
{
se.erase (it); //it这个迭代器只是失效了,并没有丢哦~
}
else
{
cout << "ohehe~~ " << endl;
}
for (it = se.begin(); it!=se.end(); it++)
{
cout << *it << endl;
}
return 0;
}
相关文章推荐
- hibernate_validator_05
- 为什么说物流企业离不开商业智能系统
- android——判断当前网络是否可用
- jsp 对request.getSession(false)的理解(附程序员常疏忽的一个漏洞)
- UVA-10815 Andy's First Dictionary
- Redis集群部署与测试
- c# Timer_应用程序中生成定期事件
- NYOJ位数n-1问题
- URLDecoder.decode
- 取消SVN服务器的关联
- view向controller提交列表
- PHP 注册审核
- Linux基础(10)论grep 与egrep的区别
- UVA-10361 Automatic Poetry
- x265 2.0版本更新
- java 加解密
- Yii使用DeleteAll连表删除出现报错问题的解决方法
- 指定排序规则的TreeSet集合
- 关于Mysql 触发器
- 开窗函数 First_Value 和 Last_Value