C语言 错误提示:error C2143: syntax error : missing ';' before ')'
charamount(b){#defineN12#defineM1000inti,j,k,repeat=1,month[N][M];FILE*fp;for(i=0;i<=...
char amount(b)
{
#define N 12
#define M 1000
int i,j,k,repeat=1,month[N][M];
FILE* fp;
for(i=0;i<=11;i++)
for(j=0;j<1000;j++)
month[i][j]=number();
if((fp=fopen("array.txt","w"))==NULL) //写入文件
{
printf("Failure to open array.txt!\n");
exit(0);
}
for(i=b) 【这边提示】
{
for(j=0;j<1000;j++)
{
fprintf(fp,"%2d",month[i][j]);
}
}
fclose(fp);
if((fp=fopen("array.txt","r"))==NULL) //读出文件
{
printf("Failure to open array.txt!\n");
exit(0);
}
for(i=b) 【这边提示】
{
for(j=0;j<1000;j++)
{
fscanf(fp,"%2d",&month[i][j]);
}
printf("\n");
}
fclose(fp);
return 0;
}
想知道这样怎么解决? 展开
{
#define N 12
#define M 1000
int i,j,k,repeat=1,month[N][M];
FILE* fp;
for(i=0;i<=11;i++)
for(j=0;j<1000;j++)
month[i][j]=number();
if((fp=fopen("array.txt","w"))==NULL) //写入文件
{
printf("Failure to open array.txt!\n");
exit(0);
}
for(i=b) 【这边提示】
{
for(j=0;j<1000;j++)
{
fprintf(fp,"%2d",month[i][j]);
}
}
fclose(fp);
if((fp=fopen("array.txt","r"))==NULL) //读出文件
{
printf("Failure to open array.txt!\n");
exit(0);
}
for(i=b) 【这边提示】
{
for(j=0;j<1000;j++)
{
fscanf(fp,"%2d",&month[i][j]);
}
printf("\n");
}
fclose(fp);
return 0;
}
想知道这样怎么解决? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询