#include<iostream.h>
void ArrayToMatrix(double Array[],int row,int col,double *Matrix[])
{
for(int i = 0;i < row;i++)
{
for(int j = 0;j < col;j++)
{
Matrix[j] = Array[i % col + j];//Array的大小必须是col*row
}
}
}
//---------------------------------------------------------------------------
int main()
{
char c;
double *m[7];
for(int k = 0;k < 7;k++)
m[k] = newdo
uble[5];
double a[35] = {149,4,186,144,112,83,156,134,86,61,161,44,0,132,43,179,13,198,106,145,61,191,192,37,143,112,128,159,159,125,192,181,21,167,17};
ArrayToMatrix(a,7,5,m);
for(int i = 0;i < 7;i++)
{
for(int j = 0;j < 5;j++)
cout<<m[j]<<",";
cout<<endl;
}
for(int k = 0;k < 7;k++)
delete m[k];
cin>>c;
return 0;
}
//---------------------------------------------------------------------------