home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK4 / SAMPLES / CPPTUTOR / INTARRAY.H$ / INTARRAY
Encoding:
Text File  |  1991-12-11  |  428 b   |  24 lines

  1. // INTARRAY.H
  2.  
  3. // This is an example class from Chapter 8 of the C++ Tutorial. This
  4. //     class demonstrates the overloaded subscript operator ([]).
  5.  
  6. #if !defined( _INTARRAY_H_ )
  7.  
  8. #define _INTARRAY_H_
  9.  
  10. class IntArray
  11. {
  12. public:
  13.      IntArray( int len );
  14.      int getLength() const;
  15.      int &operator[]( int index );
  16.      ~IntArray();
  17. private:
  18.      int length;
  19.      int *aray;
  20. };
  21.  
  22. #endif // _INTARRAY_H_
  23.  
  24.