摘要: #include #include "Item.h"static Item *q;static int N, head, tail;void QUEUEinit(int maxN){ q = (Item *)malloc((maxN+1)*sizeof(Item)); N = maxN+1; head = N; tail = 0;}int QUEUEempty(){ return (head%N == tail);}void QUEUEput(Item item){ q[tail++] = item; tail = tail%N;}Item QUEUE... 阅读全文
posted @ 2013-11-20 13:14 CJin 阅读(1402) 评论(0) 推荐(0)