标题:美人计!!!!!!!!!!!!
取消只看楼主
剑人
Rank: 1
等 级:新手上路
帖 子:58
专家分:0
注 册:2005-9-21
 问题点数:0 回复次数:0 
美人计!!!!!!!!!!!!

#include <iostream.h> #include <iomanip.h> const int m = 3; const int n = 4;

int * change(int*& p) { int temp[n][m]; for(int i=0;i<m;++i) for(int j=0;j<n;++j) temp[j][i] = p[i][j]; return temp; } int _tmain(int argc, _TCHAR* argv[]) { int a[m][n]; for(int i=0;i<m;++i) { for(int j=0;j<n;++j) cin>>a[i][j]; cout<<endl; } a = change(a); for(int i=0;i<m;++i) { for(int j=0;j<n;++j) cout<<setw(4)<<a[i][j]<<endl; } return 0; } 为什么编译不通过,谢谢!

搜索更多相关主题的帖子: 美人计 
2005-10-02 10:03



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-29196-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.078758 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved