>>454 これを参考にしろ
わかんなかったらあきらめろ。
template<class T> class Array {
  const int limit;
  T* a;
public:
 A( int aLimit ) : limit(aLimit), a( new T[limit] ) {}
T& operator[]( int i ) {
   if( 0 <= i && i < limit )
      return a[i];
   else
      throw out_of_range("shine");
 }
};