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
编译通过
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
编译通过