First commit

This commit is contained in:
2017-01-24 13:17:59 +01:00
commit b49c1e543f
9 changed files with 260 additions and 0 deletions

15
stack.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
struct t_stack {
unsigned char* data{ nullptr };
int top{ 0 };
int max{ 0 };
};
t_stack stack_new(const int size);
const bool stack_isempty(t_stack& stack);
const bool stack_isfull(t_stack& stack);
void stack_push(t_stack& stack, const char value);
const char stack_pop(t_stack& stack);
const char stack_peek(t_stack& stack);
void stack_delete(t_stack& stack);