数据结构
爱码仕1024
目前专注于Java后台开发
展开
-
数据结构--图的创建以及遍历
邻接表表示的图,创建以及遍历原创 2017-05-21 10:01:03 · 4697 阅读 · 0 评论 -
数据结构--图的最小生成树Prim算法
数据结构–图的最小生成树Prim算法原创 2017-05-21 11:02:40 · 871 阅读 · 0 评论 -
[Error] base operand of '->' has non-pointer type 'stac
犯错=成长编写顺序栈时出现下边的提醒31[Error] base operand of '->' has non-pointer type 'stack'直接上代码(错误版本):#include <stdlib.h>#include <stdio.h>#define SIZE 1000typedef struct{ int data[SIZE]; int top;}stack原创 2017-06-16 08:49:13 · 15868 阅读 · 4 评论 -
行编辑程序
加油加油~//行编辑程序 #include <stdio.h>#include <stdlib.h># define MAX 1000typedef struct { char data[MAX]; int top;}stack;void Init(stack &s){ s.top =-1;}void Push(stack &s,char e){ if(s.to原创 2017-06-16 18:31:54 · 1679 阅读 · 1 评论 -
c语言中[Error] variable or field 'CreatList' declared void错误原因分析
#include <stdio.h>#include <stdlib.h>struct LNode{ int data; LNode *next;}*List,LNode;void CreatList(List &L, int n){//创建一个含有n个元素的单链表 List p; L=(List)malloc(sizeof(struct LNode)); L原创 2017-06-14 15:30:19 · 50641 阅读 · 3 评论 -
合并两个有序链表
在纠错中不断进步以下是合并两个有序链表为一个有序链表的代码(错误的):#include <stdio.h>#include <stdlib.h>//假设都是从小到大排列 typedef struct LNode{ int data; LNode *next;}*List,LNode;void Creat(List &L,int n){//创建链表 List p;//用于原创 2017-06-14 16:46:49 · 403 阅读 · 0 评论 -
单链表某一元素的删除
为啥总是犯十分智障的错误!!!错误代码:#include <stdio.h>#include <stdlib.h>//删除元素 typedef struct LNode{ int data; LNode *next;}*List,LNode;void Creat(List &L,int n){//创建链表 List p;//用于循环创建的节点 L=(List)ma原创 2017-06-14 19:48:25 · 652 阅读 · 0 评论 -
单链表元素的插入
这一次还挺顺利。。。。#include <stdlib.h>#include<stdio.h>typedef struct LNode{ int data; LNode *next;}*List,LNode;void Creat(List &L,int n){//创建链表 List p;//用于循环创建的节点 L=(List)malloc(sizeof(stru原创 2017-06-14 20:16:07 · 7120 阅读 · 1 评论 -
双向链表删除问题
关于自己为什么总是犯很脑残的错误。。。吃点脑残片估计就好了 上代码,双向链表删除问题:#include <stdio.h>#include <stdlib.h>typedef struct DLNode{ int data; DLNode *prior; DLNode *next;}*DList,DLNode;void Creat(DList &L,int n){/原创 2017-06-15 18:21:16 · 1132 阅读 · 0 评论