135 "The stack contains %u elements with a capacity of %u.\n",
140 for (int32_t i = 0; i <
stack->
size; i++)
142 printf(
"Index: %d, Value %f\n", i,
stack->
data[i]);
150 uint32_t capacity = 4u;
stack_value_t TopStack(mystack_t *stack)
Return the top object of the stack.
void PrintStack(mystack_t *stack)
Print the whole stack.
bool StackIsFull(mystack_t *stack)
Check if the Stack object is full.
mystack_t * CreateStack(uint32_t capacity)
Create a Stack object.
bool StackIsEmpty(mystack_t *stack)
Check if the Stack object is empty.
mystack_t * FreeStack(mystack_t *stack)
Free the memory of a given Stack object.
void PushStack(mystack_t *stack, stack_value_t value)
Push a new object to the stack.
stack_value_t PopStack(mystack_t *stack)
Pop the object on top of the stack.