//你可以参考一下
#include
#include
#include
using namespace std;
int main(int argc,char* argv[])
{
int i,j,n,**arr;
cout<<"请输入矩阵的行列数:";
cin>>n;
arr=new int*[n];
for(i=0;i
arr[i]=new int[n];
}
cout<<"请输入"<
for(j=0;j
cin>>arr[j][i];
}
}
cout<<"行列互换后,矩阵的各元素是:"<
for(j=0;j
cout<
cout<
for(i=0;i
delete [] arr[i];
}
delete [] arr;
system("PAUSE");
return EXIT_SUCCESS;
}
第六行那个数组?不能直接赋值吧