编程
Pert鑫
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
设计模式之观察者模式
C++实现观察者模式 include <iostream> include <vector> using namespace std; class observer///定义了观察者的一个接口 { virtual void update(int temp)=0; virtual void dispaly()=0; } class board1:public obser...原创 2019-06-16 14:59:04 · 150 阅读 · 0 评论 -
C++中Set容器类的简单实现
C++中Set容器类的简单实现代码(这是我的第一个文章,写的不好请大家见谅) 代码(这是我的第一个文章,写的不好请大家见谅) using namespace std; class Set{ private: class Node; class iterator{ private: Node *current; friend class S...原创 2019-06-11 09:40:35 · 1802 阅读 · 0 评论 -
String容器的简单实现
String容器的简单实现(C++) #include <iostream> #include <cstring> using namespace std; class Mystring { friend ostream & operator<<(ostream & o, const Mystring & temp); pub...原创 2019-06-16 19:58:23 · 191 阅读 · 0 评论 -
汉诺塔问题(递归实现)
汉诺塔(c语言) #include<stdio.h> ///参数n代表有多少层,A,B,C分别代表三根柱子。这个函数表示从A移到C,绕过B void hanoi(int n, char A, char B, char C) { if (n == 1) { printf("%c -> %c\n", A, C); } else { hanoi(n-1,A, C, B...原创 2019-06-12 13:38:05 · 246 阅读 · 0 评论 -
C++实现文本查询程序
此程序可以用于查询一个英语文本中某个单词出现的次数和显示所在行数 #include<iostream> #include<istream> #include<fstream> #include<ostream> #include<string> #include<list> #include<vector> #in...原创 2019-07-04 08:52:21 · 646 阅读 · 0 评论
分享