摘要:
代码:# include <stdio.h># include <stdlib.h># define MAXSIZE 2 /*队列长度*//*存储结构*/typedef struct queue_tag { int * front; /*指向队首*/ int * rear ; /*指向队尾*/}ds_queue;/*初始化*/void ds_init(ds_queue * q) { int * temp ; temp = (int *)malloc(MAXSIZE * sizeof(int)) ; if(!temp) exit(0) ; q->front = te 阅读全文