上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 92 下一页
摘要: 1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<string> 5 6 7 /* 8 4.1 函数对象 9 10 4.1.1 函数对象概念 11 12 概念: 13 重载函数调用操作符的类,其对象常 阅读全文
posted @ 2021-05-12 19:46 yub4by 阅读(59) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdlib> using namespace std; #include<vector> #include<string> #include<map> #include<ctime> #define CEHUA 0 #define MEIS 阅读全文
posted @ 2021-05-12 16:03 yub4by 阅读(114) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<map> 5 6 7 /* 8 3.9.5 map查找和统计 9 10 find(key); //查找key是否存在,若存在,返回该键的元素的迭代器; 阅读全文
posted @ 2021-05-12 15:04 yub4by 阅读(187) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<map> 5 6 7 /* 8 3.9.3 map大小和交换 9 10 size(); //返回容器中元素的数目 11 empty(); //判断容器 阅读全文
posted @ 2021-05-12 15:03 yub4by 阅读(207) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<map> 5 6 7 /* 8 3.9 map/multimap容器 9 10 3.9.1 map基本概念 11 12 简介: 13 map中所有元素 阅读全文
posted @ 2021-05-12 15:02 yub4by 阅读(149) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<set> 5 #include<string> 6 7 8 /* 9 3.8.8 set容器的排序 10 11 学习目标:set容器默认排序规则为从小 阅读全文
posted @ 2021-05-12 11:19 yub4by 阅读(146) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<set> 5 #include<string> 6 7 8 /* 9 3.8.6 set和multiset区别 10 11 set不可以插入重复数据, 阅读全文
posted @ 2021-05-12 11:16 yub4by 阅读(122) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<set> 5 6 7 /* 8 3.8.3 set容器大小和交换 9 10 size(); //返回容器中元素的数目 11 empty(); //判断 阅读全文
posted @ 2021-05-12 11:14 yub4by 阅读(127) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdlib> using namespace std; #include<set> /* 3.8 set/multiset容器 3.8.1 set基本概念 简介:所有元素都会在插入时自动被排序 本质:set/multiset属于关联式容器, 阅读全文
posted @ 2021-05-12 11:12 yub4by 阅读(119) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdlib> using namespace std; #include<list> #include<string> /* 3.7.8 list容器的排序案例 案例描述:将Person自定义数据类型进行排序,Person中属性有姓名、年龄 阅读全文
posted @ 2021-05-11 17:30 yub4by 阅读(85) 评论(0) 推荐(0)
上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 92 下一页