diff options
| author | Steve Lee <me@xiangyangli.com> | 2017-10-17 00:12:32 +0800 |
|---|---|---|
| committer | Steve Lee <me@xiangyangli.com> | 2017-10-17 00:12:32 +0800 |
| commit | b46c49228497cb440467167bad3123c327bd620f (patch) | |
| tree | 7547f4da0694b7c85e57e7e56cd1f0e6f3cdc4d8 /data_structures/chapter_3/stack.h | |
| parent | 37f4cc25e5bcf68539d2b3828ecff5d72ae8c74b (diff) | |
| download | 42-b46c49228497cb440467167bad3123c327bd620f.tar.xz 42-b46c49228497cb440467167bad3123c327bd620f.zip | |
add
Diffstat (limited to 'data_structures/chapter_3/stack.h')
| -rw-r--r-- | data_structures/chapter_3/stack.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/data_structures/chapter_3/stack.h b/data_structures/chapter_3/stack.h new file mode 100644 index 0000000..f93c467 --- /dev/null +++ b/data_structures/chapter_3/stack.h @@ -0,0 +1,16 @@ +#ifndef _STACK_H + +struct node; +typedef struct node *ptr_to_node; +typedef ptr_to_node stack; +typedef int elem; + +int is_empty(stack s); +stack create_stack(); +void dispose_stack(stack s); +void make_empty(stack s); +void push(elem x, stack s); +elem top(stack s); +void pop(stack s); + +#endif |
