当前位置: 技术问答>linux和unix
ubuntu的gcc 不能用了,什么原因啊?
来源: 互联网 发布时间:2016-09-13
本文导语: To run a command as administrator (user "root"), use "sudo ". See "man sudo_root" for details. yl@ubuntu:~$ gedit 1.c yl@ubuntu:~$ gcc 1.c 1.c: In function ‘main’: 1.c:10: error: ‘for’ loop initial declarations are only allowed in C99 mode 1.c:...
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
yl@ubuntu:~$ gedit 1.c
yl@ubuntu:~$ gcc 1.c
1.c: In function ‘main’:
1.c:10: error: ‘for’ loop initial declarations are only allowed in C99 mode
1.c:10: note: use option -std=c99 or -std=gnu99 to compile your code
yl@ubuntu:~$ ./a.out
bash: ./a.out: 没有该文件或目录
See "man sudo_root" for details.
yl@ubuntu:~$ gedit 1.c
yl@ubuntu:~$ gcc 1.c
1.c: In function ‘main’:
1.c:10: error: ‘for’ loop initial declarations are only allowed in C99 mode
1.c:10: note: use option -std=c99 or -std=gnu99 to compile your code
yl@ubuntu:~$ ./a.out
bash: ./a.out: 没有该文件或目录
|
http://topic.csdn.net/u/20091211/16/6e3c8daf-d9f0-417f-ad45-77f0d67dc56c.html
你的for是这样的把 这种循环好像只有C99标准支持
for(int i = 0;i
你的for是这样的把 这种循环好像只有C99标准支持
for(int i = 0;i