C++ 总结大项目:机房预约系统项目(数据结构 +指针+class(类操作)+面向对象三大特性[继承+多态+封装]+文件(读,写,保存,重写,重建,清空)+string(比较,截取,追加),+容器多个操作,嵌套+算法+清空数据)
摘要:1 /** 2 * 项目名称:机房预约系统 3 * 时 间:2021-08 4 * 作 者:Bytezero!·zhenglei 5 * 6 * 系统简介: 7 * 学校有几个规格不同的机房,由于使用时经常出现“撞车”的现象,开发一套系统,解决这一问题 8 * 身份简介: 9 * 学生代表:申请使用
阅读全文
posted @
2021-08-20 19:15
Bytezero!
阅读(714)
推荐(0) 编辑
C++ 基于STL的演讲比赛流程管理系统(sort算法+小型算法(accumulate)+内建函数对象+string字符串拼接+字符串截取+多个容器基础操作+与用户交互+文件的读写+保存+重建+整体文件数据的清空)
摘要:1 /* 2 比赛规则: 3 学校举行一演讲比赛,共12个人参加,比赛两轮,第一轮为淘汰赛 第二轮为决赛 4 每名选手都有对应的编号:如10001~10012 5 比赛方式:分组比赛 每组6人 6 第一轮分为两小组,整体按照选手编号进行抽签后顺序演讲 7 十个评委分别个每名选手打分,去除最高分和最低
阅读全文
posted @
2021-08-19 10:35
Bytezero!
阅读(208)
推荐(0) 编辑
C++ //常用集合算法 //set_intersection //求俩个容器的交集 //set_union //求两个容器的并集 //set_difference //求两个容器的差集
摘要:1 //常用集合算法 2 //set_intersection //求俩个容器的交集 3 //set_union //求两个容器的并集 4 //set_difference //求两个容器的差集 5 6 #include<iostream> 7 #include<vector> 8 #include
阅读全文
posted @
2021-08-18 20:36
Bytezero!
阅读(175)
推荐(0) 编辑
C++ //常用算术生成算法 //#include<numeric> accumulate //fill //向容器中填充指定的元素
摘要:1 //常用算术生成算法 //#include<numeric> accumulate 2 //fill //向容器中填充指定的元素 3 #include<iostream> 4 #include<vector> 5 #include<numeric> 6 #include<algorithm> 7
阅读全文
posted @
2021-08-18 19:41
Bytezero!
阅读(74)
推荐(0) 编辑
C++ //常用拷贝和替换算法 //copy //replace 将指定区间范围内的旧元素修改为新元素 //replace_if(满足条件的元素,替换指定的元素) //swap 互换两个容器的元素
摘要://常用拷贝和替换算法 //copy //replace 将指定区间范围内的旧元素修改为新元素 //replace_if(满足条件的元素,替换指定的元素) //swap 互换两个容器的元素 #include<iostream> #include<vector> #include<algorithm>
阅读全文
posted @
2021-08-18 19:21
Bytezero!
阅读(122)
推荐(0) 编辑
C++//常用排序算法 sort //打乱 random_shuffle //merge 两个容器元素合并,并储存到另一容器中(相同的有序序列) //reverse 将容器内的元素进行反转
摘要:1 //常用排序算法 sort //打乱 random_shuffle 2 //merge 两个容器元素合并,并储存到另一容器中(相同的有序序列) 3 //reverse 将容器内的元素进行反转 4 5 #include<iostream> 6 #include<string> 7 #include
阅读全文
posted @
2021-08-18 15:43
Bytezero!
阅读(48)
推荐(0) 编辑
C++ //count_if //按条件统计元素个数 //自定义和 内置
摘要:1 //按条件统计元素个数 2 //count_if 3 4 #include <iostream> 5 #include<string> 6 #include<vector> 7 #include<algorithm> 8 9 using namespace std; 10 11 class Gr
阅读全文
posted @
2021-08-18 14:48
Bytezero!
阅读(104)
推荐(0) 编辑
C++ //统计元素个数 //统计内置数据类型 //统计自定义数据类型
摘要:1 //统计元素个数 2 3 #include<iostream> 4 #include<string> 5 #include<vector> 6 #include<algorithm> 7 using namespace std; 8 9 //统计内置数据类型 10 void test01() 1
阅读全文
posted @
2021-08-18 14:27
Bytezero!
阅读(126)
推荐(0) 编辑
C++ //常用算法 binary_serach //查找指定的元素 //无序序列中不可用
摘要:1 //常用算法 binary_serach 2 //查找指定的元素 3 //无序序列中不可用 4 5 6 #include<iostream> 7 #include<algorithm> 8 #include<vector> 9 10 using namespace std; 11 12 void
阅读全文
posted @
2021-08-18 10:59
Bytezero!
阅读(63)
推荐(0) 编辑
C++ //常用算法 adjacent_find //查找相邻的重复元素
摘要:1 //常用算法 adjacent_find 2 //查找相邻的重复元素 3 #include<iostream> 4 #include<string> 5 #include<algorithm> 6 #include<vector> 7 8 using namespace std; 9 10 vo
阅读全文
posted @
2021-08-18 10:46
Bytezero!
阅读(82)
推荐(0) 编辑
C++ //常用查找算法 find_if
摘要: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!
阅读(229)
推荐(0) 编辑
C++ //常用查找算法 find //自定义类型需要重载 ==
摘要: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!
阅读(202)
推荐(0) 编辑
C++ //STL---常用算法 //常用遍历 for_each //transform
摘要: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!
阅读(55)
推荐(0) 编辑
C++ //内建函数对象 算数仿函数 关系仿函数 //逻辑仿函数
摘要: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!
阅读(63)
推荐(0) 编辑
C++ //谓词 //一元谓词 //概念:返回bool类型的仿函数称为 谓词 //如果 operator()接受一个参数,那么叫做一元谓词 //如果 operator()接受 2 个参数,那么叫做一元谓词
摘要:1 //谓词 2 //一元谓词 3 //概念:返回bool类型的仿函数称为 谓词 4 //如果 operator()接受一个参数,那么叫做一元谓词 5 //如果 operator()接受 2 个参数,那么叫做一元谓词 6 7 #include<iostream> 8 #include<string>
阅读全文
posted @
2021-08-16 18:51
Bytezero!
阅读(93)
推荐(0) 编辑
C++ STL函数对象 仿函数
摘要: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!
阅读(58)
推荐(0) 编辑
C++ //案列-员工分组 ( 容器存放,查找,打印,统计,宏定义 ,随机)
摘要://案列-员工分组//描述:公司招聘10个员工(ABCDEFGHIJ),10名指派员工进入公司,需要指派那个员工在那个部门工作//员工信息有:姓名 工资组成; 部门分为:策划 美术 研发//随机给10名员工分配工资和部门//通过multimap进行信息的插入,key(部门编号) value员工//分
阅读全文
posted @
2021-08-16 16:22
Bytezero!
阅读(117)
推荐(0) 编辑
C++ map //map/multimap容器 //map容器 构造和赋值 //map大小 和 交换 //map插入和删除 //map查找和统计 //map容器排序
摘要: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!
阅读(63)
推荐(0) 编辑
C++ //set/multiset 容器 //set不可以插入重复的数字 multiset可以插入重复的数字 //ste容器构造和赋值 //set大小和交换 //set 插入和删除 //set查找和统计 //set 和 multiset 区别 //pair 对组创建 //set存放自定义数据类型 //set内置数据 进行排序
摘要:1 //set/multiset 容器 //set不可以插入重复的数字 multiset可以插入重复的数字 2 //ste容器构造和赋值 //set大小和交换 //set 插入和删除 3 //set查找和统计 //set 和 multiset 区别 4 //pair 对组创建 //set存放自定义数
阅读全文
posted @
2021-08-16 08:14
Bytezero!
阅读(683)
推荐(0) 编辑
C++ 错误 具有类型“const sort”的表达式会丢失一些 const-volatile 限定符以调用“bool sort::operator ()(int,int)” 如下:环境 vs2019 内容:set内置函数排序
摘要: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!
阅读(322)
推荐(0) 编辑