Stack.h
De la WikiLabs
Versiunea din 27 martie 2014 09:55, autor: Rhobincu (discuție | contribuții) (Pagină nouă: <syntaxhighlight lang="c"> →* * Header file for a stack implementation.: #ifndef __STACK_H__ #define __STACK_H__ struct stack{ char * data; unsigned int capacity; u...)
/**
* 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