class Array{ private: int m; double *p; public: Array(){ m = 0; p = NULL } Array( int i ) { m = i; p = new double [i] } ~Array(){ if( p != NULL) { delete [] p } } }
class ArrayDX{ private: int m; Array *p; public: ArrayDX( int i ){ m = i; p = new Array [i] } ~ArrayDX(){delete [] p} }