C++ list容器
行码阁119
这个作者很懒,什么都没留下…
展开
-
C++ list 排序案例
# include<iostream># include<list>using namespace std;class Person{public: Person(string name, int age, int height) { this->m_name = name; this->m_age = age; this->m_height = height; } string m_name; int m_age; ...原创 2021-10-18 15:36:40 · 290 阅读 · 0 评论 -
C++ list 翻转与排序
# include<iostream># include<list>using namespace std;bool myCompare(int v1,int v2){ //降序 第一个数大于第二个数 return v1 > v2;}void printList(const list<int>& L){ for (list<int>::const_iterator it = L.begin(); it != ...原创 2021-10-18 15:19:24 · 256 阅读 · 0 评论 -
C++ list容器 数据存取
# include<iostream># include<list>using namespace std;void printList(const list<int>& L){ for (list<int>::const_iterator it = L.begin(); it != L.end(); it++) { cout << *it << " "; } cout << en...原创 2021-10-18 15:03:18 · 364 阅读 · 0 评论 -
C++ list容器 插入和删除
# include<iostream># include<list>using namespace std;void printList(const list<int>& L){ for (list<int>::const_iterator it = L.begin(); it != L.end(); it++) { cout << *it << " "; } cout << en...原创 2021-10-18 14:46:48 · 827 阅读 · 0 评论 -
C++ list容器 大小操作
C++ list容器 大小操作# include<iostream># include<list>using namespace std;void printList(const list<int>& L){ for (list<int>::const_iterator it = L.begin(); it != L.end(); it++) { cout << *it << " "; } c.原创 2021-10-18 13:48:50 · 310 阅读 · 0 评论 -
C++ list容器 赋值和交换
# include<iostream># include<list>using namespace std;void printList(const list<int> &L){ for (list<int>::const_iterator it = L.begin(); it != L.end(); it++) { cout << *it<<" "; } cout << endl...原创 2021-10-18 13:42:15 · 201 阅读 · 0 评论 -
C++ list容器 list创建函数
# include<iostream># include<list>using namespace std;void printList(const list<int> &L){ for (list<int>::const_iterator it = L.begin(); it != L.end(); it++) { cout << *it<<" "; } cout << endl...原创 2021-10-18 13:31:57 · 274 阅读 · 0 评论 -
C++ 提高教程 STL list容器
原创 2021-10-18 13:15:37 · 128 阅读 · 0 评论