First commit
This commit is contained in:
15
stack.h
Normal file
15
stack.h
Normal 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);
|
||||
Reference in New Issue
Block a user