stack - /* File: stack.h *...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: /* File: stack.h * ------------------------------------------------- * This interface provides the functions for stack ADT * It uses the position-oriented unsorted list-based * ADT. */ #include "list.h" #ifndef _STACK_H #define _STACK_H #define MAX_STACK 1000 typedef ListItemType StackItemType; typedef List Stack; /* * Function: CreateStack * Usage: L = CreateStack(); * ------------------------- * This function creates a new stack instance. */ Stack CreateStack(void); /* * Function: DestroyStack * Usage: DestroyStack(S); * ------------------------- * This function frees memory allocated for a stack instance. */ void DestroyStack(Stack S); /* * Function: EmptyStack * Usage: b = EmptyStack(S); * ------------------------- * This function returns true if S is empty and * false if S contains at least one item. */ bool EmptyStack(Stack S); /* * Function: StackSize * Usage: s = StackSize(S); * ------------------------- * This function returns the number of items that are * currently on the stack.* currently on the stack....
View Full Document

This note was uploaded on 01/17/2012 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.

Page1 / 2

stack - /* File: stack.h *...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online