0
点赞
收藏
分享

微信扫一扫

【C语言】创建单向链表

穿裙子的程序员 2022-03-22 阅读 70
#include<stdio.h>
#include<malloc.h>
typedef int items;
typedef struct cell {
	items data;
	struct cell* next;
}celltype;
typedef celltype* pcelltype;
pcelltype top, rear;
void push(items x) {
	pcelltype p;
	p = (pcelltype)malloc(sizeof(celltype));
	p->data = x;
	p->next = top;
	top = p;
}
举报

相关推荐

0 条评论