home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tcpp / examples / stack2.h < prev    next >
C/C++ Source or Header  |  1990-06-09  |  324b  |  18 lines

  1. // stack2.h:   Die Klasse Stack von der Klasse
  2. //             List abgeleitet
  3. // Aus Kapitel 6 der Einführung
  4.  
  5. #include "list2.h"
  6.  
  7. class Stack : public List
  8. {
  9.    int top;
  10.  
  11. public:
  12.    Stack() {top = 0;};
  13.    Stack(int n) : List(n) {top = 0;};
  14.    int push(int elem);
  15.    int pop(int& elem);
  16.    void print();
  17. };
  18.