2018-06-11 07:00:08 +00:00
|
|
|
//
|
|
|
|
// 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"
|
2018-06-11 07:00:08 +00:00
|
|
|
|
|
|
|
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);
|
2018-06-11 07:00:08 +00:00
|
|
|
return 0;
|
|
|
|
}
|