【C语言】创建单向链表

#include
#include
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;
}

你可能感兴趣的:(c语言,开发语言)