Linux centos7 常见报错(持续更新)

 error: ‘for’ loop initial declarations are only allowed in C99 mode
   for(int i =0;i<=top;++i)
   ^
hello.c:5:3: note: use option -std=c99 or -std=gnu99 to compile your code

解决方案:
按照提示给后面加入**-std=c99** 或 -std=gnu99

在这里插入图片描述
编译通过

猜你喜欢

转载自blog.csdn.net/kris_paul/article/details/115449172