链式堆栈,又一个比上个进不了哈

#include<stdio.h>#include<stdlib.h>struct stacktype{ int data; struct stacktype *link;};typedef struct stacktype stack;int push(stack **top,int x){ stack *p; p=(stack *)malloc(sizeof(stack)); if(p==NULL) { printf("Memory alloc failed\n"); exit(-1); } p->link=...
默认分类 | 2010-06-01 15:55 | 阅读 596 次 | 评论 0 条
浏览48273次
文章分类