`

error: 'for' loop initial declaration used outside C99 mode的解决方法

 
阅读更多
error: 'for' loop initial declaration used outside C99 mode的解决方法

for(int i = 0;i<10;i++)这样写循环时可能会出现如题编译错误,解决方法有两种,如下:
1 将文件后缀名由".c"改为".cpp"
2 int i;
   for(i=0;i<10;i++)
分享到:
评论

相关推荐

    yaffs_vfs.c, android

    fs/yaffs2/yaffs_vfs.c:2383:2: error: implicit declaration of function 'get_sb_bdev' fs/yaffs2/yaffs_vfs.c: At top level: fs/yaffs2/yaffs_vfs.c:2390:2: error: unknown field 'get_sb' specified in ...

    keil常见错误.pdf

    keil常见错误 main.c(35): warning: #128-D: ...initSpi.c(6): error: #268: declaration may not appear after executable statement in block main.c(31): warning: #223-D: function "initNvic" declared implicitly

    keil错误集V1.0.pdf

    开发资料\我的资料\keil错误集V1.0.pdf 一、 main.c(35): warning: #128-D: loop is not ...initSpi.c(6): error: #268: declaration may not appear after executable statement in block 改正(定义变量放前)

    lua-5.3.4.tar.gz Mylua-5.3.4.tar.gz lua生成动态库 lua包管理 pkgconfig PKG_CONFIG_PATH

    默认编译后,再回头编译vlc开源库,发现:lua/demux.c:55:13: 错误:implicit declaration of function ‘luaL_checkint’; did you mean ‘luaL_checkany’ 经过查找后发现,此gcc中宏定义没有生效,可能加载顺序出...

    STM32F103 MAX31865程序.zip

    本人项目亲测可用 STM32F103C8T6 温度控制精度精准

    STM32_MAX31865_HAL库程序及资料.zip

    MAX31865使用HAL库程序读取温度及相关芯片资料和bug

    MAX31856 STM32 例程

    MAX31856可对来自于任何类型热电偶的信号进行冷端补偿和数字化,将输出数据格式化为以摄氏度为单位。转换器的温度分辨率达0.0078125°C,允许读取高达+1800°C以及低至-210°C (取决于热电偶类型)的温度读数,热电偶...

    实现语法分析器-编译原理

    for语句用的是枚举所有情况,你可以自行修改。 对预备工作中自然语言描述的简化C编译器的语言特性的语法,设计上下文无关文法进行描述 借助Yacc工具实现语法分析器 考虑语法树的构造: 1.语法树数据结构的设计:节点...

    LuaBind 源码 (Lua增强库)

    的方法去移除它.部分原因是任何剩余的类实例都将依赖其类. 当状态机被关闭的时候,所有 的一切都将被清理干净. LuaBind 的头文件不会直接包含 Lua.h , 而是透过 &lt;luabind/lua_include.hpp&gt; . 如果你 出于某种原因...

    STM32驱动max31865采集热电偶PT100程序

    STM32f103驱动MAX31865的程序采集PT100~PT1000,串口输出温度,已经调试验证,采用标准库,全工程给出,实在得很。

    Declaration of academic integrity form

    requirement analysis •conceptual database design •choice of the DBMS •data model mapping •physical design •implementation

    dubbo找不到dubbo.xsd报错

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    修复RzBorder.pas Number of elements differs from declaration

    RzBorder.pas Number of elements ...[Pascal Fatal Error] RzEdit.pas(2145): F2063 Could not compile used unit 'RzBorder.pas' RzBorder.pas 这个文件有问题,按下面修改即可。网上有类似的,但排版有问题。

    VMwareTools-9.9.0-230497

    在Ubuntu 14.04中安装VMware Tools的时候,可能会出现安装不上的问题 ,原因是此工具自身的问题。...error: implicit declaration of function ‘smp_mb__before_clear_bit’ 附件是我经过修改后的,可安装成功。

    Codewarrior编译出现的错误以及解决方法

    文档描述了feescale 编译工具Codewarrior编译出现的错误以及解决方法,感觉挺有用,分享分享

    PDO::errorCode讲解

    PDO::errorCode PDO::errorCode — 获取跟数据库句柄上一次操作相关的 SQLSTATE(PHP 5 &gt;= 5.1.0, PECL pdo &gt;= 0.1.0) 说明 语法 mixed PDO::errorCode ( void ) 返回值 返回一个 SQLSTATE,一个由5个字母或数字组成...

    Avalon总线下的PWM IP Core.rar

    Avalon总线下的PWM IP Core pwm_avalon_interface.rar pwm_source_new.zip

    universal_128x64_weather_station:使用ESP8266(任何模块都可以使用)和U8G2库进行显示控制的简单气象站

    Universal_128x64_weather_station简单的气象站,使用ESP8266(任何模块都可以工作)和U8G2库进行显示控制。

    au3反编译源码

    often this signature was modified or is used for a fake script that is just attached to distract & mislead a decompiler. When off it scans for the 'FILE' as encrypted text to find the start of a ...

    javatostring方法源码-LDATrainer:用于在MethodDeclaration级别解析Java源代码的简单项目。通过重写Bl

    getter的toString方法来提取MethodDeclaration中的源代码。 然后,对其进行预处理和标记以匹配JGibbLDA库的LDA模型文件格式。 JGibbLDA是一个Java库,可与Java编程语言中的LDA(潜在狄利克雷分配)一起使用。 库是...

Global site tag (gtag.js) - Google Analytics