Stack.h
De la WikiLabs
Jump to navigationJump to search
/**
* Header file for a stack implementation.
*/
#ifndef __STACK_H__
#define __STACK_H__
struct stack{
char * data;
unsigned int capacity;
unsigned int head;
};
struct stack * create_stack(unsigned int capacity);
void delete_stack(struct stack * old_stack);
int is_full(struct stack * my_stack);
int is_empty(struct stack * my_stack);
void stack_push(struct stack * my_stack, char element);
char stack_pop(struct stack * my_stack);
#endif