年轻人的努力

导航

2021年4月19日 #

set

摘要: 自动排好序,只有key,没有value,不允许重复,mutiset可以重复,不允许通过迭代器修改值,所以迭代器是cosnt 阅读全文

posted @ 2021-04-19 18:22 年轻人的努力 阅读(45) 评论(0) 推荐(0)

sort

摘要: 容器的迭代器支持随机访问的话,可以使用系统提供的标准算法sort(); 如果不支持的话,容器内部会提供对应的算法接口;比如list容器,可以使用l.sort(); 阅读全文

posted @ 2021-04-19 14:57 年轻人的努力 阅读(42) 评论(0) 推荐(0)

vector

摘要: vector迭代器支持双向,随机 阅读全文

posted @ 2021-04-19 14:55 年轻人的努力 阅读(30) 评论(0) 推荐(0)

list

摘要: 正序迭代器: iterator 逆序迭代器: reverse_iterator 正序便利: list<int> l; for(list<int>::iterator it=l.begin();it!=l.end();it++) cout<<*it<<endl; 逆序遍历: list<int> l; 阅读全文

posted @ 2021-04-19 14:35 年轻人的努力 阅读(70) 评论(0) 推荐(0)

stl

摘要: 容器: 顺序式 关联式: 算法: 访问,插入,删除,便利, 迭代器: 阅读全文

posted @ 2021-04-19 13:57 年轻人的努力 阅读(52) 评论(0) 推荐(0)