Next: Method of use
Up: Stack
Previous: Internal data structures
- int stack_size(void) - return number of items on the stack.
- int num(void) - same as stack_size().
- push(const T&) - copies the given item onto the top of the
stack, moving all other items down one.
- push(void) - moves all items down one, keeping a copy of the
previous top item on the top of the stack.
- T& pop(void) - returns the top item on the stack, while also
removing it and moving all the other items up one.
- t& top(void) - returns a reference to the top of the stack,
but does not change anything.
Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999