Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
Loading...
Searching...
No Matches
stack.h
1
/*
2
author: Christian Bender
3
4
This header represents the public stack-interface.
5
The stack is generic and self growing.
6
*/
7
8
#ifndef __STACK__
9
#define __STACK__
10
11
/*
12
initStack: initializes the stack with a capacity of 10 elements.
13
*/
14
void
initStack();
15
16
/*
17
push: pushs the argument onto the stack
18
*/
19
void
push
(
void
*
object
);
20
21
/*
22
pop: pops the top element of the stack from the stack.
23
assumes: stack not empty.
24
*/
25
void
*
pop
();
26
27
/*
28
size: gets the number of elements of the stack.
29
*/
30
int
size();
31
32
/*
33
isEmpty(): returns 1 if stack is empty otherwise 0.
34
*/
35
int
isEmpty
();
36
37
/*
38
top: returns the top element from the stack without removing it.
39
*/
40
void
*top();
41
42
#endif
push
void push(struct Stack *p, char ch)
push function
Definition:
infix_to_postfix.c:55
pop
char pop(struct Stack *p)
pop function
Definition:
infix_to_postfix.c:72
isEmpty
int isEmpty(struct Stack s)
isEmpty function
Definition:
infix_to_postfix.c:112
data_structures
stack
stack.h
Generated by
1.9.5