- 博客(0)
- 资源 (1)
空空如也
最大团问题
template <class T>
void Make1DArray(T * &x, int cols){
x = new T[cols];
}
template <class T>
void Make2DArray(T ** &x, int rows, int cols){
x = new T * [rows];
for (int i = 0; i < rows; i++)
x[i] = new T[cols];
}
template <class T>
void Make3DArray(T *** &x, int plan, int rows, int cols){
x = new T ** [plan];
for (int i = 0; i < plan; i++)
x[i] = new T* [rows];
for (int i = 0; i < plan; i++)
for (int j = 0; j < rows; j++)
x[i][j] = new T[cols];
2015-12-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人