上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 32 下一页
  2021年8月18日
摘要: 1 //常用查找算法 find_if 2 #include<iostream> 3 #include<string> 4 #include<vector> 5 #include<algorithm> 6 7 using namespace std; 8 9 //内置数据类型 10 11 class 阅读全文
posted @ 2021-08-18 10:37 Bytezero! 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1 //常用查找算法 find 2 #include<iostream> 3 #include<algorithm> 4 #include<functional> 5 #include<vector> 6 #include<string> 7 #include<map> 8 9 using name 阅读全文
posted @ 2021-08-18 09:15 Bytezero! 阅读(175) 评论(0) 推荐(0) 编辑
  2021年8月17日
摘要: 1 //STL 常用算法 2 //常用遍历 for_each 3 //transform 4 #include<iostream> 5 #include<string> 6 #include<functional> 7 #include<algorithm> 8 #include<vector> 9 阅读全文
posted @ 2021-08-17 10:53 Bytezero! 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1 //内建函数对象 算数仿函数 关系仿函数 //逻辑仿函数 2 #include<iostream> 3 #include<string> 4 #include<functional> //内建函数对象头文件 5 #include<vector> 6 #include<algorithm> 7 8 阅读全文
posted @ 2021-08-17 09:51 Bytezero! 阅读(59) 评论(0) 推荐(0) 编辑
  2021年8月16日
摘要: 1 //谓词 2 //一元谓词 3 //概念:返回bool类型的仿函数称为 谓词 4 //如果 operator()接受一个参数,那么叫做一元谓词 5 //如果 operator()接受 2 个参数,那么叫做一元谓词 6 7 #include<iostream> 8 #include<string> 阅读全文
posted @ 2021-08-16 18:51 Bytezero! 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 1 //STL函数对象 仿函数 2 #include<iostream> 3 #include<string> 4 5 using namespace std; 6 7 8 //1.函数对象在使用时,可以向普通函数那样调用,可以有参数,可以有返回值 9 class Myadd 10 { 11 pub 阅读全文
posted @ 2021-08-16 18:02 Bytezero! 阅读(55) 评论(0) 推荐(0) 编辑
摘要: //案列-员工分组//描述:公司招聘10个员工(ABCDEFGHIJ),10名指派员工进入公司,需要指派那个员工在那个部门工作//员工信息有:姓名 工资组成; 部门分为:策划 美术 研发//随机给10名员工分配工资和部门//通过multimap进行信息的插入,key(部门编号) value员工//分 阅读全文
posted @ 2021-08-16 16:22 Bytezero! 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 //map/multimap容器 //map容器 构造和赋值 //map大小 和 交换 2 //map插入和删除 //map查找和统计 //map容器排序 3 4 #include<iostream> 5 #include<map> 6 #include<string> 7 8 using na 阅读全文
posted @ 2021-08-16 14:56 Bytezero! 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 1 //set/multiset 容器 //set不可以插入重复的数字 multiset可以插入重复的数字 2 //ste容器构造和赋值 //set大小和交换 //set 插入和删除 3 //set查找和统计 //set 和 multiset 区别 4 //pair 对组创建 //set存放自定义数 阅读全文
posted @ 2021-08-16 08:14 Bytezero! 阅读(658) 评论(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! 阅读(307) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 32 下一页