随笔分类 -  数据结构

摘要:#include #include #include #include #include #include #include //#include #include //#include #define TRUE 1 #define FALSE 0 #define OK 1 #define ERRO... 阅读全文
posted @ 2015-11-18 21:17 柳下_MBX 阅读(129) 评论(0) 推荐(0)
摘要:#include#include#includetypedef int ElemType;typedef struct node{ ElemType data; struct node *next;}LinkList;void CreateList(LinkList *&L,ElemType a[... 阅读全文
posted @ 2015-09-14 19:27 柳下_MBX 阅读(169) 评论(0) 推荐(0)
摘要:从静态存储区域分配. 内存在程序编译的时候就已经分配好,这块内存在程序的整个运行期间都存在.例如全局变量、static变量.在栈上创建 在执行函数时,函数内局部变量的存储单元都可以在栈上创建,函数执行结束时这些存储单元自动被释放.栈内存分配运算内置于处理器的指令集中,效率很高,但是分配的内存容量有限... 阅读全文
posted @ 2015-09-11 19:07 柳下_MBX 阅读(270) 评论(0) 推荐(0)
摘要:#include"stdio.h"#includetypedef char ElemType;typedef struct LNode{ ElemType data; struct LNode *next;} LinkList;void CreatListF(LinkList *&L,E... 阅读全文
posted @ 2015-09-11 18:49 柳下_MBX 阅读(395) 评论(0) 推荐(0)
摘要:一、malloc()和free()的基本概念以及基本用法:1、函数原型及说明:void *malloc(long NumBytes):该函数分配了NumBytes个字节,并返回了指向这块内存的指针。如果分配失败,则返回一个空指针(NULL)。关于分配失败的原因,应该有多种,比如说空间不足就是一种。... 阅读全文
posted @ 2015-09-11 17:50 柳下_MBX 阅读(251) 评论(0) 推荐(0)