[008]C---gcc环境下的一个编译器版本问题
2024-09-20 17:11:20
最开始纯粹为了好玩,写了这样一段程序:
for(int i = ; i < ; i++);
然后欢乐的运行:
gcc practise.c -o practise
我擦咧,出现了这个:
practise.c:: error: ‘for’ loop initial declarations are only allowed in C99 mode
practise.c:: note: use option -std=c99 or -std=gnu99 to compile your code
好吧,第二行给出了答案,在for文中定义变量只有在C99标准后才支持的,古老的编译器啊。
果断改之:
gcc practise.c -o practise -std=c99
换个标准就好了。果然是要更新换代才行了啊。
最新文章
- 从is(";:checked";)说起
- 在VisualStudio 编辑器文本替换中使用正则表达式
- poi导出的excel的数字小数位过多?
- SpringBoot Schedule 配置
- SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)【转载】
- python生成数据库中所有表的DESC描述
- bzoj1266
- Python类的基础入门知识
- 过滤掉html 标签
- CH Round #49 - Streaming #4 (NOIP模拟赛Day2)
- C#:MVC引用Log4Net生成错误日志
- Algorithm -->; 求1到n的和
- Oracle的AES加密与解密用法
- SPLAY,LCT学习笔记(四)
- libevent安装方法
- 如何解决“There is no locally stored library”的问题
- mysql event 入门
- VISO画UML用例图添加Include关系的方法
- string类(三、string.format格式字符串)
- 在不适用fixed的前提下,当内容较少时footer固定在页面底部
热门文章
- 【转】Android AlertDialog 点击对话框外部区域不关闭的设置
- Apache2.2+Tomcat7.0整合配置详解
- jQuery遍历DOM
- (Java)《head first java》值得Java或面向对象基础的新手看。
- [Everyday Mathematics]20150102
- 《深入Java虚拟机学习笔记》- 第8章 连接模型
- CXF之二(CXF发布webService)
- 【Python】linux安装tornado
- matlab 函数说明&mdash;conv2
- WAMP下 搭建Zend Framework(Hello World)实例