游戏注册系统
摘要://定义函数头文件#include#include#include#include//定义全局变量int n=0,h,k;//建立game文件FILE *fp;//定义结构体数组struct game{char gamename[20];//昵称char realname[20];//真实姓名cha...
阅读全文
数据结构笔记1顺序栈
摘要:#include#include#include#define MAX 100typedef struct{int data[MAX];int top;}Stack;Stack s;//初始化 成功1int InitStack(Stack s){s.top=-1;return 1;}//判空 非空1...
阅读全文
数据结构笔记5带头结点单链表
摘要:/*本次操作是对带头节点单链表的操作 包括删除 插入 判空 建立包括删除插入函数 显示函数目的是为了对单链表做一个基本操作的总结----1*/#include#include#include#define OK 1#define ERROR -1#define OVERFLOW -2#define ...
阅读全文
数据结构笔记3双向栈
摘要:#include#include#include#define MAX 100//定义两个方向生长的栈typedef struct{int data[MAX]; int top1,top2;}DDStack;DDStack s;//创建int InitStack(DDStack s){s.top1=...
阅读全文
数据结构笔记2链栈
摘要:#include#include#include#define MAX 100struct node{int data;struct *next;}s;//初始化int InitStack(&s){s=(node *)malloc(sizeof(node));if(NULL==s) return -...
阅读全文
直接选择排序
摘要:#include#define N 10void Display(int *a, int n){ int i; for (i = 0; i a[j]) { index = j; value = a[j]; } a[index] = a[i]; a[i] = value; Displ...
阅读全文
数据结构笔记6链队列
摘要:#include#include#include#include//定义一个节点typedef struct{int data; struct *next;}QNode;//定义一个链,其中front表示链头,rear表示链尾typedef struct{ QNode *front,*rear;}L...
阅读全文
数据结构笔记4双向链表
摘要:#include#include#include#define OK 1#define ERROR -1#define OVERFLOW -2#define ENDFlAG 0//双向链表节点struct DNode{int data;struct DNode *prior,*next;}DNode...
阅读全文
归并排序
摘要:#include #include void merge(int r[],int first,int last,int mid){ int number_temp[10]={0}; int i=first,j=mid+1,k; for(k=0;k<=last-first;k++) { if...
阅读全文
希尔排序
摘要:#include#includevoid shellSort(int r[],int len);int main(void){ int r[] = {45,20,80,40,26,58,66,70}; shellSort(r,8); system("PAUSE");}void shellSor...
阅读全文
数据结构笔记7循环队列
摘要:#include#include#includetypedef struct{int data[50];int *front,*rear;int tag;}QLink;QLink *q;//初始化int Init(QLink *q){q->front=0;q->rear=0;return 0;}//...
阅读全文
简单的javamysql数据库系统
摘要:package DatabaseTest;import java.io.FileInputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import ...
阅读全文
学生信息管理系统
摘要:#include /*I/O函数*/#include /*其它说明*/#include /*字符串函数*/#define BUFLEN 100 /* 缓冲区最大字符数 */#define LEN 15 /* 学号和姓名最大字符数,实际请更改 */#define N 100 /* 最大学生人数,实际...
阅读全文