blob: 2d63452c38962ac52498e2b8a1a56929da83cc1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef _STACK_H
#define _STACK_H
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#define MAXIMUM 5
#define RESIZE 1
typedef struct stack {
int * base;
int * top;
int size;
} Stack;
bool InitStack(Stack * s);
bool DestroyStack(Stack * s);
bool Push(Stack * s, int n);
bool Pop(Stack * s, int * n);
int GetTop(Stack * s);
#endif
|