码迷,mamicode.com
首页 >  
搜索关键字:iterator    ( 4158个结果
HDU 4937 Lucky Number (数学,进制转换)
题目参考自博客:http://blog.csdn.net/a601025382s/article/details/38517783//string &replace(iterator first0, iterator last0,const_iterator first, const_iterato...
分类:其他好文   时间:2014-08-12 21:43:04    阅读次数:278
java集合框架
1)java集合框架的层次结构2)使用Collection接口定义的公用方法对集合和线性表操作3)使用Iterator接口遍历集合4)使用JDK的增强for循环替代迭代Iterator进行集合遍历5)熟悉Set接口,了解何时及如何使用HashSet,LinkedHashSet或TreeHashSet...
分类:编程语言   时间:2014-08-12 21:37:14    阅读次数:326
hdu 4941 STL HASH 模拟
http://acm.hdu.edu.cn/showproblem.php?pid=4941 比赛的时候现学的map的find...以前都是用下标做的,但是map用下标查询的话,如果查询的元素不存在,会插入一个新的元素。 贴一个map查找元素找到和找不到的模板 map,int>::iterator it=poshash.find(tmppos);//pai...
分类:其他好文   时间:2014-08-12 19:09:24    阅读次数:262
《STL源码剖析》---stl_iterator.h阅读笔记
讲解STL中迭代器的设计思想和设计的代码。其中用到了Traits编程技法和Partial Specializetion(偏特化)。...
分类:其他好文   时间:2014-08-11 21:38:42    阅读次数:503
STL vector中的crbegin方法(7)
其实crbegin就相当于cbegin+rbegin. 关于这两个函数可以看我的上两篇博文。 public member function std::vector::crbegin const_reverse_iterator crbegin() const noexcept; Return const_reverse_iterator to ...
分类:其他好文   时间:2014-08-11 08:27:33    阅读次数:262
zoj 2104
#include #include #include #include using namespace std;int main(){ int n,i,j; string s; mapm; map :: iterator it,it2; while(cin>>n...
分类:其他好文   时间:2014-08-10 21:05:10    阅读次数:250
map
#include #include #include //头文件 using namespace std;map my; //全局变量 0 map ::iterator it ; //指针 int main( ){ int i ; strin...
分类:其他好文   时间:2014-08-10 18:24:30    阅读次数:224
poj2503
#include #include #include using namespace std;char s[100],s1[100],s2[100];map my;map ::iterator it;int main(int argc, char *argv[]){int i;while (ge.....
分类:其他好文   时间:2014-08-10 12:44:00    阅读次数:203
关于Python中的yield
关于Python中的yield在介绍yield前有必要先说明下Python中的迭代器(iterator)和生成器(constructor)。一、迭代器(iterator)在Python中,for循环可以用于Python中的任何类型,包括列表、元祖等等,实际上,for循环可用于任何“可迭代对象”,这其...
分类:编程语言   时间:2014-08-10 03:55:19    阅读次数:319
STL vector中的rbegin方法(5)
public member function std::vector::rbegin C++98 C++11 reverse_iterator rbegin() noexcept; const_reverse_iterator rbegin() const noexcept; Return reverse iterator...
分类:其他好文   时间:2014-08-09 23:22:42    阅读次数:684
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!