为什么该整型变量的说明会造成编译出错?
程序代码:
unsigned 是无符号短整型,取值范围是:65535。为什么定义unsigned a[65000][5]会造成在VC6.0上编译运行不下去。 VC6.0上提示出错信息是: Linking... LINK : fatal error LNK1168: cannot open Debug/FILE_01.exe for writing 执行 link.exe 时出错. #include<stdio.h> void du(unsigned a[][5],int n); void YZ(unsigned a[][5],int n); void main() { unsigned a[65000][5]; du(a,25000); YZ(a,25000); } void du(unsigned a[][5],int n) { int i,j; FILE *pf; if((pf=fopen("e:\\FILE522_001A.txt","r"))==NULL) { printf("Cannot open file!"); return; } for(i=0;i<n;i++) for(j=0;j<5;j++) { fscanf(pf,"%4d",&a[i][j]); fscanf(pf,"\n"); } fclose(pf); } void YZ(unsigned a[][5],int n) { int i,j,counter,s; int N=1; int yuzsh[5]; printf("请输入预测下期的一组号码 ,回车\n"); for(s=0;s<5;s++) scanf("%d",&yuzsh[s]); for(i=0;i<n;i++) { for(s=0;s<N;s++) { counter=0; for(j=0;j<5;j++) { if(yuzsh[j]==a[i][j]) counter++; } } if(counter>=4) { for(j=0;j<5;j++) printf("%4d",a[i][j]); printf("\n"); } } }