- 博客(24)
- 资源 (1)
- 收藏
- 关注
原创 图 操作练习
头文件#ifndef TU_H_INCLUDED#define TU_H_INCLUDED#define MAXV 10typedef char* InfoType;typedef struct{ int no;//顶点编号 InfoType info;//顶点其他信息}VertexType;typedef struct{ int edgs[MAXV][MAX
2017-05-11 10:14:22 386
原创 循环链表实现约瑟夫问题
#include<stdio.h>#include<stdlib.h>typedef struct node{ int num; struct node *next;} data;//自定义结构体另一个名字int main(){ int i,j,n; int s=1;//从第几个开始数 int m=30;//总人数 data *p,*r,*
2017-05-11 10:12:37 377
原创 顺序栈的操作实现
#include<stdio.h>#include<stdlib.h>#define MaxSize 100typedef int ElemType;typedef struct{ ElemType data[MaxSize]; int top;}SqStack;//初始化void InitStack(SqStack* &s){ s=(SqStack*)ma
2017-05-11 10:11:56 426
原创 顺序环形队列的操作实现
#include<stdio.h>#include<stdlib.h>#define MaxSize 100typedef int ElemType;typedef struct{ ElemType data[MaxSize]; int front,rear;}SqQueue;//初始化环形队列void InitQueue(SqQueue* &q){ q=(
2017-05-11 10:10:55 614
原创 顺序串的操作实现
/*整型数据最好不要用 引用传参*/#include<stdio.h>#include<stdlib.h>#define MaxSize 100typedef struct{ char data[MaxSize]; int length;} SqString;//初始化串void InitString(SqString* &s){ s=(SqStrin
2017-05-11 10:10:17 808
原创 顺序表实现学生管理系统
#include<stdio.h>#include<iostream>#include<stdlib.h>#include<string.h>#define Maxlen 100using namespace std;struct Data//定义顺序表的元素个体{ char number[20]; char name[20]; char sex[10];
2017-05-11 10:09:23 932
原创 链栈操作实现
#include<stdio.h>#include<stdlib.h>typedef int ElemType;typedef struct linknode{ ElemType data; struct linknode *next;}LiStack;/****************初始化链栈********************/void InitStack(L
2017-05-11 10:08:42 278
原创 链队操作实现
/*@李德坤 烟台大学计算机与控制工程学院我自己对链队的理解,链队的front只要不是出队操作始终指向第一个进入的元素,而rear随着元素入队由指向第一个进入的元素逐渐后移(指向下一个元素),当然front随着元素出队而逐渐后移(和rear移动方向一样)例如1 2 13 2 14 3 2 15 4 3 2 1rear和front移
2017-05-11 10:08:00 390
原创 链表实现学生管理系统(作业)
#include<stdio.h>#include<string.h>#include<stdlib.h>#define Maxlen 100struct Data//定义链表的元素个体{ char number[20]; char name[20]; char sex[10]; int age; char examtype[20];};type
2017-05-11 10:07:10 1469 2
原创 队列实现迷宫问题
课下练习#include<stdio.h>#include<stdlib.h>#include<time.h>#define Maxsize 50int mg[10][10];void shengcheng(){ for(int i=0; i<10; i++) { mg[i][0]=1; mg[i][9]=1; mg[0][
2017-05-11 10:06:06 3446 2
原创 修正KMP算法 顺序串操作
课下练习/*整型数据最好不要用 引用传参*/#include<stdio.h>#include<stdlib.h>#define MaxSize 100typedef struct{ char data[MaxSize]; int length;} SqString;//初始化串void InitString(SqString* &s){ s=(SqS
2017-05-11 10:05:12 336
原创 KMP 顺序串操作练习
2016年10月14日 课下练习/*整型数据最好不要用 引用传参*/#include<stdio.h>#include<stdlib.h>#define MaxSize 100typedef struct{ char data[MaxSize]; int length;} SqString;//初始化串void InitString(SqString* &s)
2017-05-11 10:03:25 218
原创 二叉排序树实现简单的通讯录
头文件#ifndef TOU_H_INCLUDED#define TOU_H_INCLUDED#include<stdio.h>#include<stdlib.h>#include<iostream>using namespace std;typedef struct{ char Name[20]; char PhoneNumber[20]; char Adre
2017-05-11 09:56:27 1627 1
原创 VS2015 连接数据库操作
1.Ctrl+W+L 快捷键打开服务器资源管理器,或者视图,服务器资源管器 2.右键数据连接,创建新连接后如图所示 3.服务器名是你要连接的服务器名,可以是你自己的服务器也可以是别人的服务器,点击下拉框按钮会出现在局域网中所有的服务器。身份验证当你连接你自己的服务器可以是Windows身份验证,如果连接局域网的服务器必须是SQL server 验证,需提供登录名和密码。连接到数据库就是你
2017-05-08 19:43:15 15455 1
原创 数据库总结2
USE StudentManagerSELECT * FROM tbl_student; SELECT * FROM tbl_class AS c; 【1】单条插入数据 INSERT INTO tbl_student ( stu_number, stu_name, stu_age, birthday, class_id ) V
2017-05-07 18:54:44 320
原创 数据库总结
【1】SQL语句 1.查询所有文件 select * from 表名 home+f5 执行 2.或者(or),且(and),非(not) 【2】SQL类型 1.Char,8000 固定长度的非Unicode字符数据,固定长度的字符串相对于可变长度的字符串来说效率要高一些, 在数据长度固定的情况下优先选用固定长度,省去了计算长度的过程提高效率。char(10)能存5个汉字或者10个字母,
2017-05-07 18:53:21 329
原创 C# 餐桌项目增加、修改、删除、查询(登录注册界面)
1.封装DeskInfo类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 项目1{ public class DeskInfo { private int deskI
2017-05-07 18:45:13 1227
原创 C#操作数据库进行简单的增加修改操作
1.将项目下的App.config文件打开,修改里面的内容,存储连接字符串<?xml version="1.0" encoding="utf-8" ?><configuration> <connectionStrings> <add connectionString="Data Source=LENOVO-PC;Initial Catalog=MyDatabase;Integrated
2017-05-07 18:35:37 6835
原创 C#将数据库的元组导出生产txt文件,代码实现
数据库操作类没有封装using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data.SqlClient;using System.IO;namespace 导出数据{ class Pr
2017-05-07 18:24:20 290
原创 C# 将txt文件的数据库元组导入数据库,代码实现
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data.SqlClient;using System.IO;namespace 导入数据{ class Program
2017-05-07 18:22:41 324
原创 反序列化对象(控制台应用程序,二进制序列化)
需要将序列化后的对象生产的txt文件放到项目文件下即bin/Debug,之后要添加项目引用,上一篇文章中类Personusing System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Runtime.Serialization.Formatters.Binary;usin
2017-05-07 18:20:07 390
原创 C# 序列化对象(控制台应用程序)
文件1.txt在项目文件夹bin/Debug下,两个类写在一个命名空间下了using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Runtime.Serialization.Formatters.Binary;using System.Text;using S
2017-05-07 18:03:18 490
原创 利用下拉框选择省份、城市、地区
说明1.首先封装操作数据库的类SqlHelper,当然前提还得创建数据库连接using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Configuration;using System.Data.S
2017-05-07 17:25:09 13139
原创 C# 事件传值应用于窗口传值
Winform程序代码using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;usin
2017-05-07 17:14:07 1033
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人