From 785a6236faafb2c0a4c1f6e47da355c3a934a16b Mon Sep 17 00:00:00 2001 From: Saturneic Date: Mon, 11 Jun 2018 16:00:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stack/stack.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stack/stack.c b/stack/stack.c index 02f8e00..7d22fd2 100644 --- a/stack/stack.c +++ b/stack/stack.c @@ -9,6 +9,13 @@ #include "stack_expand.h" int main(int argc, char **argv){ - + 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; }