上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 32 下一页
  2021年8月15日
摘要: 1 //排序案列 2 //描述:将person自定义数据类型进行排序,Person中有属性 姓名,年龄,身高 3 //排序规则: 按照年龄进行的升序,如果年龄相同按照身高进行降序 4 5 #include<iostream> 6 #include<string> 7 #include<algorit 阅读全文
posted @ 2021-08-15 15:46 Bytezero! 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1 //list容器 构造函数 //list赋值和交换 //list容器大小操作 2 //list插入和删除,移除 //清空 //list数据存取back(); front() 3 //list 反转和排序 4 #include<iostream> 5 #include<list> 6 #inclu 阅读全文
posted @ 2021-08-15 15:10 Bytezero! 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1 //queue 队列 容器 先进先出 只有队头 队尾能被外界访问 因此不允许有遍历行为 2 3 4 #include<iostream> 5 #include<queue> 6 #include<string> 7 8 using namespace std; 9 10 class Person 阅读全文
posted @ 2021-08-15 13:00 Bytezero! 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1 //栈 stack 容器 先进后出 不允许遍历 2 3 4 #include<iostream> 5 #include<stack> 6 7 using namespace std; 8 9 10 void test01() 11 { 12 //特点 先进后出数据结构 13 stack<int> 阅读全文
posted @ 2021-08-15 12:58 Bytezero! 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<string> 3 #include<deque> 4 #include<vector> 5 #include<algorithm> 6 7 using namespace std; 8 9 //选手类 10 class Person 阅读全文
posted @ 2021-08-15 10:54 Bytezero! 阅读(52) 评论(0) 推荐(0) 编辑
  2021年8月14日
摘要: 1 //deque容器 构造函数 //deque赋值操作 //deque大小操作 //重新指定大小 2 //deque没有容量概念 //deque插入和删除 //deque 容器数据存取 3 ////deque 排序 sotr算法 4 5 #include<iostream> 6 #include< 阅读全文
posted @ 2021-08-14 16:52 Bytezero! 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 1 //vector 容器构造 vector赋值操作 vector 容量大小 vector插入和删除 2 //vector数据存取 vector互换容器 vector预留空间 3 #include<iostream> 4 #include<string> 5 #include<vector> 6 7 阅读全文
posted @ 2021-08-14 11:53 Bytezero! 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 1 //string字符串查找和替换 比较 存取 修改单个字符 插入和删除 string字串 2 #include <iostream> 3 #include<string> 4 5 using namespace std; 6 //查找 7 8 void test01() 9 { 10 strin 阅读全文
posted @ 2021-08-14 08:45 Bytezero! 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1 //string字符串拼接 2 #include <iostream> 3 #include<string> 4 5 using namespace std; 6 7 8 void test01() 9 { 10 string str1 = "我"; 11 12 str1 += "爱学习"; 1 阅读全文
posted @ 2021-08-14 07:35 Bytezero! 阅读(1898) 评论(0) 推荐(0) 编辑
  2021年8月13日
摘要: 1 //vector容器嵌套容器 2 #include <iostream> 3 #include <string> 4 #include<fstream> 5 #include<vector> 6 #include<algorithm> 7 using namespace std; 8 9 voi 阅读全文
posted @ 2021-08-13 17:43 Bytezero! 阅读(403) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 32 下一页