![](https://img-blog.csdnimg.cn/img_convert/08a2948ef04d41feda7d0f94525dee9a.png)
错误如上
这是因为C89不允许循环变量在for里面定义
解决方法:1.在外面定义int i=0;
2.在可写 makefile 编译指令时,将 gcc text.c -o text.out 改为 gcc -std=c99 text.c -o text.out
错误如上
这是因为C89不允许循环变量在for里面定义
解决方法:1.在外面定义int i=0;
2.在可写 makefile 编译指令时,将 gcc text.c -o text.out 改为 gcc -std=c99 text.c -o text.out