摘要: #include<iostream> #include <cstring> using namespace std; #define MAXLEN 255 /* BF算法,匹配子串 */ typedef struct{ char ch[MAXLEN+1]; int length; }SString; 阅读全文
posted @ 2020-11-21 12:13 倔强的不死人 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 包含头文件 #include <cstring> int main(){ string e = "abcdef1"; char buf[] = {0}; strcpy(buf,e.c_str()); //cout << e.c_str() << endl; //c_str是一个内容为字符串指向字符数 阅读全文
posted @ 2020-11-21 11:44 倔强的不死人 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 待解决 https://blog.csdn.net/qq_46539113/article/details/109272641 阅读全文
posted @ 2020-11-20 20:10 倔强的不死人 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 在原本单链表上进行增加 //"LinkList.h" #include<iostream> using namespace std; #define ElemType int typedef struct LNode{ ElemType data; struct LNode *next; }LNod 阅读全文
posted @ 2020-11-20 17:31 倔强的不死人 阅读(2143) 评论(0) 推荐(0) 编辑
摘要: 特别用了指针来计算 但如果是int*a = new int; *a = 1; 直接用*a去进行运算,就跟正常的队列设计是一样的了 所以感觉用指针a而不是整形*a,有点多余,感觉是误解了 #include<iostream> using namespace std; #define QElemType 阅读全文
posted @ 2020-11-20 16:14 倔强的不死人 阅读(1654) 评论(0) 推荐(0) 编辑
摘要: 简单的流程图 #include<iostream> using namespace std; #define ElemType int /* 假设以带头结点的循环链表表示队列,并且只设一个指针指向队尾元素结点(注意:不设头指针), * 试编写相应的置空队列、判断队列是否为空、入队和出队等算法。 */ 阅读全文
posted @ 2020-11-20 12:42 倔强的不死人 阅读(7169) 评论(1) 推荐(0) 编辑
摘要: //"SqStack.h" #include<iostream> using namespace std; #define SElemType_int int #define SElemType_char char #define MAXSIZE 100 typedef struct{ SElemT 阅读全文
posted @ 2020-11-19 21:10 倔强的不死人 阅读(192) 评论(0) 推荐(0) 编辑
摘要: //"SqStack.h" #include<iostream> using namespace std; #define SElemType_int int #define SElemType_char char #define MAXSIZE 100 typedef struct{ SElemT 阅读全文
posted @ 2020-11-19 17:22 倔强的不死人 阅读(143) 评论(0) 推荐(0) 编辑
摘要: //"SqStack.h" #include<iostream> using namespace std; #define SElemType int #define MAXSIZE 100 typedef struct{ SElemType *base; SElemType *top; int s 阅读全文
posted @ 2020-11-18 23:11 倔强的不死人 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 顺序栈的基本操作 //"SqStack.h" #include<iostream> using namespace std; #define SElemType int #define MAXSIZE 100 typedef struct{ SElemType *base; SElemType *t 阅读全文
posted @ 2020-11-18 22:18 倔强的不死人 阅读(451) 评论(0) 推荐(0) 编辑