½º ÅÃ(Stack)
¡á ½ºÅÃÀÇ ¹è¿ ±¸Çö
[ ½ºÅà »ý¼º ]
struct create_stack(unsigned int max_elements) { STACK S; /*1*/ S=(STACK) malloc(sizeof(struct stack_record)); /*2*/ s->array=(int*) malloc(sizeof(int) * max_elements);/*3*/ S->top=EMPTY_TOS;/*4*/ S->capacity=max_elements; return(S);}