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*/
14void initStack();
15
16/*
17 push: pushs the argument onto the stack
18*/
19void push(void *object);
20
21/*
22 pop: pops the top element of the stack from the stack.
23 assumes: stack not empty.
24*/
25void *pop();
26
27/*
28 size: gets the number of elements of the stack.
29*/
30int size();
31
32/*
33 isEmpty(): returns 1 if stack is empty otherwise 0.
34*/
35int isEmpty();
36
37/*
38 top: returns the top element from the stack without removing it.
39*/
40void *top();
41
42#endif
void push(struct Stack *p, char ch)
push function
Definition infix_to_postfix.c:55
char pop(struct Stack *p)
pop function
Definition infix_to_postfix.c:72
int isEmpty(struct Stack s)
isEmpty function
Definition infix_to_postfix.c:112