![](https://img-blog.csdnimg.cn/20190617213036189.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
C++中STL学习
看侯捷老师的《STL源码剖析》,顺便做下笔记
momomo_mocs
这个作者很懒,什么都没留下…
展开
-
boost::any + std::shared_ptr结合使用
【代码】boost::any + std::shared_ptr结合使用。原创 2023-12-27 16:53:51 · 422 阅读 · 0 评论 -
iterator_traits
https://www.cnblogs.com/dmq5488287/articles/2841341.html原创 2020-05-01 23:00:08 · 186 阅读 · 0 评论 -
not1,not2,bind1st和bind2nd用法
https://www.cnblogs.com/blueoverflow/p/4737122.html原创 2020-04-18 22:45:53 · 492 阅读 · 0 评论 -
STL之pair
1、头文件 #include <utility>2、代码 // 使用默认构造函数得到的pair, 使用前必须赋值 std::pair<std::string, int64_t> pair_tmp = {"ma", 123}; std::cout << pair_tmp.first << "->" ...原创 2019-11-23 18:14:38 · 212 阅读 · 0 评论 -
STL之vector容器(序列式容器)
一、头文件<vector>二、迭代器示意(截图自侯捷老师的《STL源码剖析》)三、成员函数1.iterator begin()2.iterator end()3.size_type size()4.size_type capcity()5.bool empty()6.reference front() //第一个元素7.reference ba...原创 2019-07-27 18:52:51 · 207 阅读 · 0 评论 -
STL之list双向循环链表
一、头文件<list>二、功能:模板形式的 双向循环链表数据结构三、定义方式list<元素的数据类型> 变量名; e.g: list<int> list_var;四、常用成员函数用法1、void push_back(const T& var); 功能:插入一个节点作为尾结点e.g: list<int>...原创 2019-06-18 22:39:24 · 2611 阅读 · 0 评论