diff options
Diffstat (limited to 'inc/stack.h')
-rw-r--r-- | inc/stack.h | 15 |
1 files changed, 9 insertions, 6 deletions
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 |