-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy pathstack.h
More file actions
42 lines (33 loc) · 695 Bytes
/
stack.h
File metadata and controls
42 lines (33 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
author: Christian Bender
This header represents the public stack-interface.
The stack is generic and self growing.
*/
#ifndef __STACK__
#define __STACK__
/*
initStack: initializes the stack with a capacity of 10 elements.
*/
void initStack();
/*
push: pushs the argument onto the stack
*/
void push(void *object);
/*
pop: pops the top element of the stack from the stack.
assumes: stack not empty.
*/
void *pop();
/*
size: gets the number of elements of the stack.
*/
int size();
/*
isEmpty(): returns 1 if stack is empty otherwise 0.
*/
int isEmpty();
/*
top: returns the top element from the stack without removing it.
*/
void *top();
#endif