用VS2015能顺利编译,但用VC编译后却出现如下错误:
将多维数组的每一行进行从小到大排列,#include"stdio.h"
void function(int a[3][4]){
int i,j,b,n;
for(i=0;i<=2;i++)
for(b=0;b<=2;b++)
for(j=b;j<=3;j++)
if(a[i][b]>a[i][j]){
n=a[i][b];
a[i][b]=a[i][j];
a[i][j]=n;
}
}
main(){
int i,j,u;
u=0;
int c[3][4]={{3,2,7,3},{4,6,88,9},{33,45,777,22}};
function(c);
for(i=0;i<=2;i++){
printf("{");
for(j=0;j<=3;j++)
printf("%d ",c[i][j]);
printf("},");
u++;
if(u==3)
printf("\b ");
}
}
用VS2015能顺利编译,但用VC编译后却出现如下错误: