template<class T>
class Array{
public:
Array(int row,int col);
~Array();
T** GetArray(){return array;}
int GetRow(){return _row;}
int GetCol(){return _col;}
private:
int _row;
int _col;
T** array;
};
template<class T>
Array<T>::Array(int row,int col):_row(row),_col(col)
{
array=new T*[row];
for(int i=0;i<row;i++)
array[i]=new T[col];
}
class Array{
public:
Array(int row,int col);
~Array();
T** GetArray(){return array;}
int GetRow(){return _row;}
int GetCol(){return _col;}
private:
int _row;
int _col;
T** array;
};
template<class T>
Array<T>::Array(int row,int col):_row(row),_col(col)
{
array=new T*[row];
for(int i=0;i<row;i++)
array[i]=new T[col];
}
template<class T>
Array<T>::~Array()
{
for(int i=0;i<_row;i++)
delete [] array[i];
delete [] array;
}
Array<T>::~Array()
{
for(int i=0;i<_row;i++)
delete [] array[i];
delete [] array;
}