apstack - #ifndef _APSTACK_H # #define _APSTACK_H /...

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

View Full Document Right Arrow Icon
#ifndef _APSTACK_H #define _APSTACK_H # // uncomment line below if bool not built-in type // #include "bool.h" / // ******************************************************************* // Last Revised: 8/14/98 // // - commented out the #include "bool.h", dhj // - abort -->> exit // // APCS stack class // ******************************************************************* / #include "apvector.h" // used for stack implementation # template <class itemType> class apstack { public: // constructors/destructor apstack( ); // construct empty stack apstack( const apstack & s ); // copy constructor ~apstack( ); // destructor // assignment const apstack & operator = ( const apstack & rhs ); // accessors const itemType & top( ) const; // return top element (NO pop) bool isEmpty( ) const; // return true if empty, else false int length( ) const; // return number of elements in stack // modifiers void push( const itemType & item ); // push item onto top of stack void pop( ); // pop top element void pop( itemType & item );
Background image of page 1

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

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

Page1 / 2

apstack - #ifndef _APSTACK_H # #define _APSTACK_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