Computer Science City College of New York
  CSc212 Section PR Data Structures 

Lecture 12 (I) Stacks

The code could be found at http://www.cs.colorado.edu/~main/chapter7/
 

Stack Template Class with a Fixed-Size Array (Our Implementation, Section 7.3)

    The Header file stack1.h

    The Implementation file stack1.template

Stack Template Class with a Linked List (Our Implementation - Section 7.3)

    The Header file stack2.h

    The Implementation file stack2.template

Note: the stack templat class uses the linked list with node template class (node2.h and node2.template)
 

Two Application Programs (Using STL <stack>, Section 7.2)

    Balanced Parentheses  parens.cxx

      ( (  )  (  ) )

    Basic Calculator Program calc.cxx

      Input : a fully parenthesized numeric expression
          ((15/3)*2)
      Output: the result
          10



Zhigang Zhu ( zhu@cs.ccny.cuny.edu )