00001
00002
00003
00004
00005 #ifndef ARRAY1_H
00006 #define ARRAY1_H
00007
00008 #include <iostream.h>
00009
00010 class Array {
00011 friend ostream &operator<<( ostream &, const Array & );
00012 friend istream &operator>>( istream &, Array & );
00013 public:
00014 Array( int = 10 );
00015 Array( const Array & );
00016 ~Array();
00017 int getSize() const;
00018 const Array &operator=( const Array & );
00019 bool operator==( const Array & ) const;
00020
00021
00022
00023 bool operator!=( const Array &right ) const
00024 { return ! ( *this == right ); }
00025
00026 int &operator[]( int );
00027 const int &operator[]( int ) const;
00028 static int getArrayCount();
00029
00030 private:
00031 int size;
00032 int *ptr;
00033 static int arrayCount;
00034 };
00035
00036 #endif
00037