- 4
- 0
- 约6.76千字
- 约 5页
- 2017-02-06 发布于重庆
- 举报
链表_数据结构程序集
Linkqueue
#includestdio.h
#includestring.h
#includeerrno.h
#includestdlib.h
typedef struct linknode
{
struct linknode *next;
int data;
}linknode;
typedef struct linkqueue
{
linknode *front;
linknode *rear;
}linkqueue;
linkqueue *CreateEmptylinkqueue()
{
linkqueue *head=NULL;
head=(linkqueue *)malloc(sizeof(linkqueue));
if (NULL == head) {
fprintf(stderr, malloc : %s\n, strerror(errno));
exit(-1);
}
return head;
}
int Clearlinkqueue(linkqueue *s)
{
if(NULL==s){
fprintf(stderr,malloc :%s\n,strerror(errno));
exit(-1);
}
linknode *head=NULL;
head=(linknode
原创力文档

文档评论(0)