摘要: #include <stdio.h>#include <stdlib.h>#include <stdbool.h>typedef struct item{ int data;} Item;//节点结构 typedef struct node{ Item item; struct node *nextNode;}Node, *queue;//队列的链表结构 typedef struct { queue front; queue rear;} linkQueue;//初始化 void initQueue(linkQueue *q);//入队 void enQue 阅读全文
posted @ 2013-03-24 23:04 chapterlin 阅读(128) 评论(0) 推荐(0)
摘要: #include <stdlib.h>#include <stdbool.h>#include <stdio.h>#define MAXSIZE 20typedef struct { int date;} Item;typedef struct { Item item[MAXSIZE]; int front; //头指针 int rear; //尾指针 } queue;//初始化bool initQueue(queue *q);//入队 void EnQueue(queue *q, Item *e);//遍历void QueueTraverse(queue 阅读全文
posted @ 2013-03-21 16:21 chapterlin 阅读(141) 评论(0) 推荐(0)
摘要: 浮点四则运算 浮点数真值 S=正负R的J次方 * W 浮点数计算机表示 Jf J1 J2...Jm Sf W1 ....Wn Jf--Jm是阶码 Sf--Wn是尾数,Sf是数符 R:阶码底,隐含约定 J:阶码,为定点整数,补码或移码表示.其位数决定数值范围;阶符表示数的大小 W:尾数,为定点小数,原码或补码表示.其位数决定数的精度;数符表示数的正负 尾数规格化:1/2 <= |W| < 1 最高有效位绝对值为1浮点数加减运算 步骤: 检测是否简化操作,判断操作数是否为0(尾数为0,阶码下溢 对阶 使两数阶码相... 阅读全文
posted @ 2013-03-16 21:37 chapterlin 阅读(192) 评论(0) 推荐(0)
摘要: cpp] view plaincopy01.#define INITSIZE 100 //线性表的初始大小 02.#define INCREACEMENT 10 //定义线性表的分配容量 03. 04.struct List 05.{ 06. int * firstElement ; //首元素的地址 07. int length ; //现有元素个数 08. int allocate_size ; //当前的最大容量 09.}; 10. 11./* 初始化L ... 阅读全文
posted @ 2013-03-16 15:41 chapterlin 阅读(166) 评论(0) 推荐(0)
摘要: 01.#include <stdio.h> 02.#include <stdbool.h> 03.#include <stdlib.h> 04.typedef struct ElementData 05.{ 06. int index; 07.} Item ; 08. 09.typedef struct node 10.{ 11. Item item; 12. struct node * nextNode; 13.} Node; 14. 15.typedef Node * linkList ; 16. 17.Node * CreateI... 阅读全文
posted @ 2013-03-16 15:40 chapterlin 阅读(111) 评论(0) 推荐(0)