From 4bdad2d5c7dec0eb19c418cadb47cc3124092310 Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Thu, 3 Nov 2022 01:08:28 +0200 Subject: praks IV done --- inc/stack.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'inc/stack.h') diff --git a/inc/stack.h b/inc/stack.h index fcc976a..45f8daa 100644 --- a/inc/stack.h +++ b/inc/stack.h @@ -5,13 +5,16 @@ struct stack_st { int len; - int arr[STACK_SIZE]; + int size; + int* arr; }; -void stackPush(int val); -int stackPop(void); -int stackIsEmpty(void); -int stackPeek(void); -void stackPrint(void); +void stackPush(struct stack_st *s, int val); +int stackPop(struct stack_st *s); +int stackIsEmpty(struct stack_st *s); +int stackPeek(struct stack_st *s); +void stackPrint(struct stack_st *s); + +void stackFree(struct stack_st *s); #endif -- cgit v1.2.3