搜索

Linux中gcc编译出现以下问题,代码如图

7.c: In function ‘main’: 7.c:14:1: error: expected ‘;’ before ‘for’  for(int i=0;!feof(chazhao);i++)  ^ 7.c:24:1: error: expected declaration or statement at end of input  }  ^
头像
741 次浏览2021.07.12 提问
20

最新回答(1条回答)

头像
2021.07.14 回答

1、chazhao=fopen这一行最后加分号;

2、最后一个}前加一句,return 0;

抢首赞
置顶