ZE-Standard-Libraries/stack/stack.c

22 lines
460 B
C
Raw Normal View History

//
// stack.c
// ZE-Standard-Libraries
//
// Created by 胡一兵 on 2018/6/11.
// Copyright © 2018年 ZE. All rights reserved.
//
2018-06-11 07:57:25 +00:00
#include "stack_expand.h"
int main(int argc, char **argv){
2018-06-11 08:00:48 +00:00
Stack *t_stack = initStack();
for(int i = 0; i < 10; i++){
pushStack(t_stack, snodeWithInt(i));
}
for(int i = 0; i < 10; i++){
printf("%d",getValueByIntForSNode(popStack(t_stack)));
}
releaseStack(t_stack);
return 0;
}