12 2011 档案

摘要:1.循环队列#include<stdio.h>#define MAXSIZE 10#define TRUE 1#define FALSE 0typedef struct{ int data[MAXSIZE]; int front; int rear;}SqQueue;int InitQueue(SqQueue *Q);int QueueLength(SqQueue *Q);int EnQueue(SqQueue *Q,int m);int DeQueue(SqQueue *Q,int *e);int main(){ SqQueue queue; int t; ... 阅读全文
posted @ 2011-12-22 10:52 shiney 阅读(315) 评论(0) 推荐(0)
摘要:#include<stdio.h>#include<stdlib.h>#include<string.h>#define TRUE 1#define FALSE 0typedef struct LinkNODE{ int data; LinkNODE *next;}LinkNode,*LinkStackPtr;typedef struct LinkNODE1{ char data; LinkNODE1 *next;}LinkNode1,*LinkStackPtr1;typedef struct{ LinkStackPtr top; int count;}Li 阅读全文
posted @ 2011-12-21 22:04 shiney 阅读(1693) 评论(0) 推荐(0)
摘要:1.栈的顺序存储#include<stdio.h>#include<stdlib.h>#include<time.h>#define TRUE 1#define FALSE 0#define MAXSIZE 100typedef struct{ int data[MAXSIZE]; int top;}SqStack;int Push(SqStack *s,int m);int Pop(SqStack *s,int *e);int main(){ SqStack stack; stack.top=-1; int e; Push(&stack,1); P 阅读全文
posted @ 2011-12-20 11:31 shiney 阅读(247) 评论(0) 推荐(0)
摘要:很久之前看的一部电影了,是个冷片,看的人不多,一直想写点什么却至今才动笔。不是关于电影,是关于婚姻。 没有走进过婚姻的青年男女,尤其是女性,无不对婚姻有着美好的向往,仿佛有个男人跟你领了结婚证,你便一切都有了保障:1.满足了世俗的要求,不会有父母亲戚友邻当面背面念叨你嘲笑你;2.生活上有了依靠,尤其是女性,家里没有男人的话换灯泡修电扇打老鼠这些活谁来干,男人的话则需要女人料理生活的琐事;3.性。 所以婚姻实在是一件互惠互利的事。 但是现实是,真正幸福长久的婚姻又极其的少。并且还有一个值得关注的现象就是,幸福与家庭背景,学历,性格并不是成正比的关系。换句话说,并不是一个家庭背景好,... 阅读全文
posted @ 2011-12-17 23:31 shiney 阅读(264) 评论(0) 推荐(0)
摘要:1. 定义 (1)顺序存储typedef struct{ ElemType data[MAXSIZE]; int length;}SqList;(2)链式存储typedef struct NODE{ int data; struct NODE *next;}node;一个结构内部包含一个类型为该结构本身的成员是非法的,但是包含一个指向该结构的指针是合法的。 注意:这里必须要用结构的标签来声明指针。2. 实现(1)顺序存储结构的获取元素,插入,删除操作。#include<stdio.h>#include<stdlib.h>#include<time.h>#de 阅读全文
posted @ 2011-12-08 17:20 shiney 阅读(347) 评论(1) 推荐(1)
摘要:1. 结构体的声明 struct A{...}; C: struct A a; C++: A a; 阅读全文
posted @ 2011-12-08 16:25 shiney 阅读(168) 评论(0) 推荐(0)