summaryrefslogtreecommitdiff
path: root/comp/work/37/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'comp/work/37/stack.h')
-rw-r--r--comp/work/37/stack.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/comp/work/37/stack.h b/comp/work/37/stack.h
new file mode 100644
index 0000000..03390ba
--- /dev/null
+++ b/comp/work/37/stack.h
@@ -0,0 +1,10 @@
+typedef struct stack {
+ int *sp;
+ int value;
+ int (*pop)(struct stack *stack);
+ void (*push)(struct stack *stack, int value);
+ void (*free)(struct stack *stack);
+ int *stack;
+} stack;
+
+stack *initstack(int value, size_t size);