
c++
文章平均质量分 75
lz_zl_
Knowledge serve reality
展开
-
期末课程设计之 c++操作mysql完成机票预订系统(vc 6.0配置mysql环境)
本次大二期末的课程设计题是 完成一个机票预订系统,主要方法是通过c++函数操作mysql数据库来实现系统的功能,程序中还是有些许不足,在此传上请多多指教(毕竟小菜鸟).程序复制到vc 6.0(原因是我用的是vc 6.0),用c++操作数据库并且在vc 6.0上运行需要在vc 6.0中配置一下,具体步骤如下(告诉你个秘密:用语言(c,c++等等)操作数据库来完成各种系统其实比用文件写更简单哦!!原创 2016-06-28 13:30:45 · 3958 阅读 · 8 评论 -
内部排序-选择类排序
/** * * Coder: LinX 2017-7-18 - 2017-7-21 * * 内容: 选择类排序 * */ #include #include void selectSort(int *a,int len); //简单选择排序排序 void heapSort(int *a,int len); //堆排序(大顶) void原创 2017-07-22 09:07:40 · 292 阅读 · 0 评论 -
内部排序-交换类排序
/** * * Coder: LinX 2017-7-18 - 2017-7-21 * * 内容: 交换类排序 * */ void bubbleSort(int *a,int len); //冒泡排序 void quickSort(int *a,int start,int end); //快速排序 int main() { int a[10]原创 2017-07-22 09:06:24 · 280 阅读 · 0 评论 -
内部排序-插入排序
/** * * Coder: LinX 2017-7-18 - 2017-7-21 * * 内容: 插入类排序 * */ void insertSort(int *a,int len); //插入排序 void shellSort(int *a,int len); //希尔排序 void halfFindSort(int *a,int len); /原创 2017-07-22 09:02:49 · 267 阅读 · 0 评论 -
Kruskal算法(不能运行)
/** * * Coder: LinX 2017-7-16 * * 内容: 使用Kruskal算法计算无向图的最小生成树 * * 说明: 此算法复杂度只与图的边数有关,因此适合于稀疏图 */ #include #include int enums; typedef struct { int start,end; //边的两个顶点原创 2017-07-16 09:30:04 · 343 阅读 · 0 评论 -
Prim算法
/** * * Coder: LinX 2017-7-15 * * 内容: Prim算法计算无向图的最小生成树的权值 * * 说明: 因为此算法的复杂度只与顶点数有关,因此适合于稠密图 * */ #include #include #define MAXSIZE 100 #define INF 1000 typedef struct {原创 2017-07-16 09:28:38 · 313 阅读 · 0 评论 -
基于邻接表的图的各种遍历
基于邻接表的图的各种遍历/** * * Coder: LinX 2017-7-13 - 2017-7-14 * * 内容: 基于邻接表的图的各种遍历 * */ #include #include #define MAXSIZE 100 typedef struct ArcNode { int adj_vex; struct Ar原创 2017-07-14 10:22:11 · 503 阅读 · 0 评论 -
基于邻接矩阵的图的各种遍历
基于邻接矩阵的图的各种遍历/** * * 作者: LinX 2017-7-8 - 2017-7-13 * * 内容: 图的邻接矩阵表示法以及基于邻接矩阵的遍历 * * * 说明: 基于邻接矩阵的图的DFS和BFS中,对于二维数组中每个数都要访问一遍(判断是否为1) * * 因此时间复杂度为O(n^2) * * */ #include原创 2017-07-13 09:16:19 · 863 阅读 · 0 评论 -
循环链表的结构及其操作
/** * 作者: LinX 2017-6-12 * * 内容: 循环链表的结构和操作 */ #include #include typedef int ElemType; typedef struct CirNode { ElemType data; struct CirNode *next; }CirNode,CirList; CirNod原创 2017-06-12 09:50:07 · 441 阅读 · 0 评论 -
双链表的结构及其操作
双链表的结构及其操作/** * 作者:LinX 2017/6/9- * * 内容:双链表的结构以及操作 * */ #include #include typedef int ElemType; typedef struct DNode { ElemType data; struct DNode *prior; struct DNode *n原创 2017-06-12 09:41:07 · 393 阅读 · 0 评论 -
使用栈计算中缀表达式
这里只能用于计算十以内的表达式/** * * 作者: LinX 2017-6-18 - 2017-6-19 * * * 内容: 运用栈对中缀表达式求值 * */ #include #include #include #define MAXSIZE 100 char oper[MAXSIZE]; //操作符栈 int topOpe原创 2017-06-22 13:43:37 · 1015 阅读 · 0 评论 -
二叉树
树和二叉树应该是考研中比较重要的考点,这里的代码仅供自己参考!!!/** * 作者:LinX 2017-6-29 - 2017-7-1 * * 内容: 二叉树的结构及其操作 * */ #include #include #define MAXSIZE 100 typedef char ElemType; typedef struct BTNod原创 2017-07-01 16:35:49 · 431 阅读 · 0 评论 -
单链表的结构及其操作
单链表的结构及其操作/** * 作者:LinX 2017/6/3 -2017/6/9 * 内容:单链表及其操作 */ #include #include typedef int ElemType;typedef struct LNode{ ElemType data; struct LNode *next;}LNode,LinkList;/*单链表的基本操作原创 2017-06-09 09:39:10 · 363 阅读 · 0 评论 -
顺序表的结构及其操作
顺序表的结构及其操作/** * 作者:LinX 2017/6/2 * 内容:顺序表及其操作 */ #include #include #define MAX_SIZE 100 //顺序表最大长度 typedef int ElemType;typedef struct{ ElemType data[MAX_SIZE-1]; int length; }SqList原创 2017-06-05 08:38:02 · 651 阅读 · 0 评论 -
链队列的结构及其操作
/** * * 作者:LinX 2017-6-16-上午 * * 内容:链队列的结构及其应用 * * 看严蔚敏教材上的图解,就很清晰 */#include #include typedef int ElemType;typedef struct QNode{ ElemType data; struct QNode *next; }QNod原创 2017-06-16 11:01:21 · 388 阅读 · 0 评论 -
循环队列的结构及其操作
/** * 作者: LinX 2017-6-15-上午 - 2017-6-16-上午 * * 内容: 循环队列的结构及其基本操作 * */ #include #include #define MAXSIZE 5typedef int ElemType;typedef struct{ ElemType data[MAXSIZE]; int原创 2017-06-16 11:00:12 · 467 阅读 · 0 评论 -
栈的结构及其操作
/** * 作者: LinX 2017-6-15 * * 内容: 顺序栈的结构以及基本操作 * */ #include #include #define MAXSIZE 100 typedef int ElemType; typedef struct SqStack { ElemType data[MAXSIZE]; int原创 2017-06-16 10:58:24 · 345 阅读 · 0 评论 -
KMP算法对next数组的理解 - 一上午的思想结晶
这里的对next数组的解释仅个人想法,有错误请提出。我们现在讨论的是求解next数组(设str是子串):首先明确next数组是什么:next数组保存的是最大相同前缀后缀的长度+1比如ababc,在c这个位置最前面ab跟ab相等且长度最大,next[5]=2+1一. 当str[i]=str[j]时,next[++j]=++i;(理解为当主串发生不匹配时,下一个比较原创 2017-08-02 12:02:08 · 441 阅读 · 0 评论