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

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