摘要: 此程序模拟了银行排队系统,用链表实现队列排队List.h 1 #ifndef LIST_H 2 #define LIST_H 3 #include 4 #include 5 6 #define OK 0 7 #define ERROR -1 8 //define the structure node 9 typedef struct queue10 {11 int value;12 struct queue *next;13 }Queue;14 15 // front point to head node16 typedef struct li... 阅读全文
posted @ 2013-11-23 17:02 zxjay 阅读(3080) 评论(0) 推荐(0) 编辑
摘要: 用单链表实现的队列,带一个头节点实现简单的功能,程序中可能含有bug; 1 //this program used for basic operation about queue using list 2 // this list has a head node 3 // 4 //Author:zxJay 5 // 6 7 #include 8 #include 9 10 #define OK 0 11 #define ERROR -1 12 //define the structure node 13 typedef struct queue 14 { ... 阅读全文
posted @ 2013-11-23 14:29 zxjay 阅读(572) 评论(0) 推荐(1) 编辑