home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c021 / 7.img / EXAMPLES.ZIP / STACK.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-04  |  269 b   |  16 lines

  1. // stack2.h:    A Stack class derived from the List class
  2.  
  3. #include "list.h"
  4.  
  5. class Stack : public List
  6. {
  7.    int top;
  8.  
  9. public:
  10.    Stack() {top = 0;};
  11.    Stack(int n) : List(n) {top = 0;};
  12.    int push(int elem);
  13.    int pop(int& elem);
  14.    void print();
  15. };
  16.