home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / rehack / contain / array.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-01  |  864 b   |  29 lines

  1. #ifndef __ARRAY_H
  2. #define __ARRAY_H
  3.  
  4. // ╔════════════════════════════════════════════════╗
  5. // ║ array.h, array.cpp                             ║
  6. // ╟────────────────────────────────────────────────╢
  7. // ║ mixed-type array                               ║
  8. // ╟────────────────────────────────────────────────╢
  9. // ║ Written by Gus Smedstad                        ║
  10. // ╟────────────────────────────────────────────────╢
  11. // ║ Copyright 1990-91 NoGate Consulting            ║
  12. // ╚════════════════════════════════════════════════╝
  13. #ifndef __CONTAIN_H
  14. #include "contain.h"
  15. #endif
  16.  
  17. class array : public container {
  18. protected:
  19.   int         t_size;
  20.   containable **data;
  21. public:
  22.   array(int);
  23.   virtual ~array();
  24.   void put(containable *);
  25.   int  size() { return t_size; };
  26.   containable *& operator [] (int arg) { return data[arg]; };
  27.  };
  28.  
  29. #endif