//来自牛客网参考解析 template <class 形参名,class 形参名,......> 返回类型 函数名(参数列表) { 函数体 } 类模板的格式为: template <class 形参名 ,class 形参名,…> class 类名 { ... }; 类模板的格式为: templat Read More
posted @ 2018-10-08 07:19 _KikyoBK Views(118) Comments(0) Diggs(0) Edit
//C++数据结构与算法(第4版) Adam Drozdek 著 徐丹 吴伟敏<<清华大学出版社>> 队列容器默认由deque实现,用户也可以选择list容器来实现。如果用vector容器实现会导致编译错误,因为pop()是通过调用pop_front()来实现的,假定pop_front()是底层容器 Read More
posted @ 2018-10-07 21:10 _KikyoBK Views(424) Comments(0) Diggs(0) Edit
// <<现代操作系统教程>> 黄红桃 清华大学出版社 1.并发性 并发(Program Concurrence)指两个或多个活动在同一时间间隔内发生。在多道程序环境下,是指在一段时间内可以有多道程序可以同时运行。 并发与并行: (1)并行要求在微观上同步, 即在时间的一点上同时运行。并发并不要求在 Read More
posted @ 2018-10-07 20:30 _KikyoBK Views(237) Comments(0) Diggs(0) Edit
转载 https://blog.csdn.net/qq_36528114/article/details/78667034 快速排序(Quick Sort)是对冒泡排序的一种改进,基本思想是选取一个记录作为枢轴,经过一趟排序,将整段序列分为两个部分,其中一部分的值都小于枢轴,另一部分都大于枢轴。然后 Read More
posted @ 2018-10-05 21:40 _KikyoBK Views(161) Comments(0) Diggs(0) Edit
转载:https://www.cnblogs.com/liyux/p/5594423.html TCP粘包现象 TCP粘包通俗来讲,就是发送方发送的多个数据包,到接收方后粘连在一起,导致数据包不能完整的体现发送的数据。 TCP粘包原因分析 导致TCP粘包的原因,可能是发送方的原因,也有可能是接受方的 Read More
posted @ 2018-10-05 19:39 _KikyoBK Views(206) Comments(0) Diggs(0) Edit
////C++数据结构与算法(第4版) Adam Drozdek 著 徐丹 吴伟敏<<清华大学出版社>> STL中的通用栈类实现为容器适配器:使用以指定方式运行的容器。栈容器不是重新创建的,它只是对已有容器做适当的调整。默认情况下,deque是底层容器,但是用户可以用下面的声明选择链表或向量: st Read More
posted @ 2018-10-05 09:38 _KikyoBK Views(494) Comments(0) Diggs(0) Edit
//C++数据结构与算法(第4版) Adam Drozdek 著 徐丹 吴伟敏<<清华大学出版社>> 头文件:include<list> list() 创建一个空链表 list(size_type n, const T& el=T()) 创建一个链表,其中包含el的n个副本 list(iterato Read More
posted @ 2018-10-03 20:51 _KikyoBK Views(810) Comments(0) Diggs(0) Edit
接口是指只包含纯虚函数的抽象类,抽象类只能派生类,不能定义对象。 Read More
posted @ 2018-09-29 20:31 _KikyoBK Views(166) Comments(0) Diggs(0) Edit
//https://www.cnblogs.com/ForeverJoker/archive/2013/05/25/qsort-sort.html 头文件:#include<cstdlib> 原型:void qsort(void *base, int nelem, int width, int (* Read More
posted @ 2018-09-29 19:43 _KikyoBK Views(163) Comments(0) Diggs(0) Edit
转载:https://www.cnblogs.com/riskyer/p/3221912.html C++的异常处理结构为: try { //可能引发异常的代码 } catch(type_1 e) { // type_1类型异常处理 } catch(type_2 e) { // type_2类型异常 Read More
posted @ 2018-09-29 15:30 _KikyoBK Views(121) Comments(0) Diggs(0) Edit