上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 33 下一页
  2021年8月16日
摘要: 1 //set/multiset 容器 //set不可以插入重复的数字 multiset可以插入重复的数字 2 //ste容器构造和赋值 //set大小和交换 //set 插入和删除 3 //set查找和统计 //set 和 multiset 区别 4 //pair 对组创建 //set存放自定义数 阅读全文
posted @ 2021-08-16 08:14 Bytezero! 阅读(706) 评论(0) 推荐(0)
摘要: C++ 错误 具有类型“const sort”的表达式会丢失一些 const-volatile 限定符以调用“bool sort::operator ()(int,int)” 如下: 环境 vs2019 内容:set内置函数排序 1 #include <iostream> 2 #include<se 阅读全文
posted @ 2021-08-16 07:55 Bytezero! 阅读(339) 评论(0) 推荐(0)
  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! 阅读(249) 评论(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! 阅读(125) 评论(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! 阅读(229) 评论(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! 阅读(242) 评论(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! 阅读(64) 评论(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! 阅读(69) 评论(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! 阅读(100) 评论(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! 阅读(163) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 33 下一页