07 2019 档案

摘要:数据结构List,叫列表,也叫线性表。栅栏fence的概念,也就是操作定位。 List的抽象模板类代码: 1 /* class List */ 2 template <class Elem> 3 class List 4 { 5 public: 6 //set the position of the 阅读全文

posted @ 2019-07-28 14:04 金色的省略号 阅读(397) 评论(0) 推荐(0) 编辑

摘要:一、朴素模式匹配 #include <stdio.h> #include <stdlib.h> /* 在源串S中查找目标串T,如没有找到则打印出错信息; 否则,在第一次匹配后请将源串S的匹配部分就地逆置 */ typedef char elementype; typedef struct node 阅读全文

posted @ 2019-07-17 10:19 金色的省略号 阅读(346) 评论(0) 推荐(0) 编辑

摘要:1、Clock类,运算符 >、运算符 < 、友元函数运算符>、运算符 < 重载 #include<iostream> #include<iomanip> using namespace std; class Clock{ int hour; int minute; int second; publi 阅读全文

posted @ 2019-07-15 17:41 金色的省略号 阅读(111) 评论(0) 推荐(0) 编辑

摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 class MyComplex{ 7 8 double a; 9 double b; 10 11 public: 12 13 MyComplex(double a = 0.0, double b = 0.0){ 14 ... 阅读全文

posted @ 2019-07-08 21:02 金色的省略号 阅读(393) 评论(0) 推荐(0) 编辑

摘要:1 #include <iostream> 2 #include <cstdlib> 3 #include <limits> 4 using namespace std; 5 6 class MyComplex{ 7 public: 8 double a; 9 double b; 10 public 阅读全文

posted @ 2019-07-08 17:54 金色的省略号 阅读(175) 评论(0) 推荐(0) 编辑

摘要:1 #include <iostream> 2 #include <vector> 3 #include <limits> 4 using namespace std; 5 6 template <typename T> 7 class Array{ 8 T* data_; 9 int size_; 阅读全文

posted @ 2019-07-08 14:52 金色的省略号 阅读(169) 评论(0) 推荐(0) 编辑

摘要:公有继承(public)、私有继承(private)和保护继承(protected)三种继承方式,可见即可以访问,不可见即不可以访问。 1. 公有继承方式: 基类成员的可见性对派生类来说,基类的公有成员和保护成员可见:基类的公有成员和保护成员作为派生类的成员时,它们都保持原有的状态;基类的私有成员不 阅读全文

posted @ 2019-07-07 10:36 金色的省略号 阅读(1304) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示