![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c/c++
文章平均质量分 78
v_yang_guang_v
hello world!
展开
-
双向循环链表的创建,增删查改
#include using namespace std; typedef int ElemType; //定义双向循环链表的结点 typedef struct DuLNode { ElemType elem; struct DuLNode *prior; struct DuLNode *next; }DuLNode,*DuLinklist; //初始化一个空链表 void ini原创 2015-04-10 13:50:27 · 558 阅读 · 0 评论 -
C语言函数参数传递详解
本文照搬 一、三道考题 开讲之前,我先请你做三道题目。(嘿嘿,得先把你的头脑搞昏才行……唉呀,谁扔我鸡蛋?) 考题一,程序代码如下: void Exchg1(int x, int y) { int tmp; tmp = x; x = y; y = tmp; printf("x = %d, y = %d\n", x, y); } main转载 2015-04-08 22:39:53 · 341 阅读 · 0 评论 -
栈的线性存储
#include using namespace std; typedef int ElemType ; #define init_space 100 #define incre_space 10 struct SequenceStack{ ElemType *base; ElemType *top; int stacksize; }; int init(SequenceStack &原创 2015-05-05 15:50:49 · 310 阅读 · 0 评论 -
栈的链式存储结构
#include using namespace std; #define ElemType int typedef struct Node { ElemType elem; struct Node *next; }Node,*linklist; int init(linklist &head) { head=(Node*)malloc(sizeof(Node)); if(!he原创 2015-05-05 12:39:49 · 281 阅读 · 0 评论 -
队列的线性存储
循环 队列不能再次增加空间,只能设置一个最大的长度。而对于无法估计长度的队列只能使用链式队列。 上图为线性循环队列,队列尾部指向队列最后一个元素的下一位,队列首部和尾部之间有一个空位置不放元素,用于区分队列满还是空。 #include using namespace std; #define ElemType int #define MAXSIZE 100 typedef st原创 2015-05-07 10:13:30 · 468 阅读 · 0 评论