• 2023-05-05关联容器1
    #include<set>#include<iterator>#include<utility>#include<iostream>usingnamespacestd;intmain(){ set<double>s; while(true){ doublev; cin>>v; if(v==0)break; autor=s.insert(v); if(!r.second) cout<<v<<
  • 2023-04-27顺序容器3
    #include<list>#include<iterator>#include<string>#include<iostream>usingnamespacestd;intmain(){ stringnames1[]={"Alice","Helen","Lucy","Susan"}; stringnames2[]={"Bob","Davi
  • 2023-04-24【介绍】C++五种迭代器
    目录1. 输入迭代器(Input Iterator):2. 输出迭代器(Output Iterator):3. 前向迭代器(Forward Iterator):4. 双向迭代器(Bidirectional Iterator):5. 随机访问迭代器(Random Access Iterator): 1. 输入迭代器(Input Iterator):支持单次读取和前进;即只能遍历一遍集合,并且只能向