From f768d9bdb84e846d89aac66a4f3433a44241c298 Mon Sep 17 00:00:00 2001 From: Galin Simeonov Date: Mon, 17 May 2021 17:29:08 +0300 Subject: parser formed --- stack.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 stack.h (limited to 'stack.h') diff --git a/stack.h b/stack.h new file mode 100644 index 0000000..14e557a --- /dev/null +++ b/stack.h @@ -0,0 +1,22 @@ +#ifndef GSTACK_H +#define GSTACK_H GSTACK_H +#include +typedef struct Stack Stack; + +struct Stack_Node +{ + struct Stack_Node *next; + void *data; +}; +struct Stack +{ + struct Stack_Node *first; + size_t size; +}; + +void Stack_Init(Stack *stack); +void Stack_Push(Stack *stack,void* data); +void* Stack_Pop(Stack *stack); + + +#endif -- cgit v1.2.3