 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
class
dyn_a1 {
|
|
public:
|
|
explicit dyn_a1(INDEX) throw(); //1D
array of size i
|
|
~dyn_a1() throw(); //destructor
|
|
int &operator[](INDEX) throw();
//subscript operator
|
|
private:
|
|
dyn_a1(const dyn_a1 &); //prohibit copy ctor
|
|
dyn_a1 &operator=(const dyn_a1
&); //prohibit assign
|
INDEX d1; //# of elements in 1D array
|
|
int* a0; //base address of all elements
|
|
int dummy; //for out of bounds reference
|
|
};
|
|