- 博客(12)
- 收藏
- 关注
原创 C++利用libtelnet库完成客户端类封装telnet收发
需要根据返回数据调整接受规则,我连接设备服务器为一问一答,返回数据为JSON且以\n结尾。CThreadWrapper为基础线程类。
2023-01-15 10:31:51
1217
原创 算法之约瑟夫斯问题
#include<iostream>#include<list>#include<cstdlib>using namespace std; int main(int argc, char* argv[]){ int all; printf("请输入总人数:"); cin>>all; int num; printf("请输入消去的编号:"); cin>>num; if(all<num
2022-03-17 21:41:35
198
原创 操作系统之银行家算法
#include<iostream>#include<assert.h>#include<graphics.h>#include<time.h>#include<conio.h>using namespace std;const int MAXPROCESS=100;const int MAXRESOURCE=100; int Available[MAXRESOURCE]; //可用资源向量 int Max[
2022-03-17 21:31:32
273
原创 数据结构之使用单链表创建学生表
#include<stdio.h>#include<iostream>#include<string.h>#define MAXSIZE 100using namespace std;typedef struct{ char xh[9]; //定义学生学号 char xm[20]; //定义学生姓名 int fs; //定义学生分数}Student;typedef Student ElemType;typedef struct L
2020-10-23 19:27:22
2675
原创 数据结构之使用顺序表创建学生表
#include<stdio.h>#include<iostream>#define MAXSIZE 100using namespace std;typedef struct{ char xh[9]; //定义学生学号 char xm[20]; //定义学生姓名 int fs; //定义学生分数}Student;typedef Student ElemType;typedef struct{ ElemType *Elem; int Le
2020-10-23 19:25:48
3708
2
原创 数据结构之最短路径
#include<stdio.h>#include<iostream>using namespace std;typedef int Status;typedef char VerTexType;typedef int ArcType;#define MVNum 100#define MaxInt 32767#define OK 1#define ERROR 0#define ture 1#define flase 0typedef struct /
2020-10-23 19:24:19
300
原创 数据结构之DFS和BFS算法
#include<stdio.h>#include<iostream>using namespace std;typedef int Status;typedef char VerTexType;typedef int SElemType;typedef int ArcType;#define MVNum 100#define MAXSIZE 100 //栈空间#define MAXQSIZE 100 //队列空间#define OK 1#define
2020-10-23 18:37:09
198
原创 数据结构之哈希查找链地址法
可能是浏览器原因汉字变成了乱码,不过影响应该不大#include<stdio.h>#include<iostream>#include <cstring>using namespace std;typedef int ElemType;#define m 13 typedef struct hnode { int data; struct hnode *next; }h
2020-10-22 22:52:16
1562
原创 操作系统之处理机调度的几种算法
#include <iostream>using namespace std;typedef struct work{ int num;//进程序号 float grade;//优先级 float JB;//动态优先级调整 float uptime;//提交时间 float costtime;//耗费时间长度 float starttime;//开始时间 float endtime;//结束时间 float time;//周转时间 float averagetim
2020-10-22 20:22:10
256
原创 操作系统之时间片轮转算法
#include<stdio.h>#include <iostream>using namespace std;#define MAX 100struct PCB{ char name[10]; //进程名称 float uptime; //到达时间 float costtime; //运行时间 float starttime; //开始运行时间 float endtime; //运行结束时
2020-10-22 19:44:20
1089
空空如也
C++怎么连续cmd命令
2022-11-15
mfc程序崩溃,消息分发出现问题
2022-10-08
TA创建的收藏夹 TA关注的收藏夹
TA关注的人