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

这是用C-free编译出来的有问题,感觉很郁闷,因此百度一些,也只怪自己平时练得少;在这写下来希望能有所帮助。

error: 'for' loop initial declaration used outside C99 mode的解决方法的更多相关文章

  1. error: 'for' loop initial declarations are only allowed in C99 mode

    error: 'for' loop initial declarations are only allowed in C99 mode   出现错误: error: 'for' loop initia ...

  2. Win下GCC报错 error: ‘for’ loop initial declarations are only allowed in C99 mode

    ##报错## 用GCC编译for循环会出现以下错误 error: 'for' loop initial declarations are only allowed in C99 mode 如图所示: ...

  3. error: ‘for’ loop initial declarations are only allowed in

    使用gcc,出现如下错误: thread_join.c:7:5: error: 'for' loop initial declarations are only allowed in C99 mode ...

  4. InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法

    InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法 140628  8:10:48 [Note] Plugi ...

  5. 遇到Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so问题的解决方法

    运行一个基于tensorflow的模型时,遇到Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so问题. 解决方法:打开 ...

  6. hbase运行时ERROR:org.apache.hadoop.hbase.PleaseHoldException:Master is initializing的解决方法

    最终解决了,其实我心中有一句MMP. 版本: hadoop 2.6.4 + hbase0.98 第一个问题,端口问题8020 hadoop默认的namenode 资源子接口是8020 端口,然后我这接 ...

  7. ERROR: JDWP Unable to get JNI 1.2 environment的解决方法

    当执行如下代码时: //从控制台获取输入 InputStream is = System.in; Scanner scanner = new Scanner(is); System.out.print ...

  8. error: ‘for’ loop initial declarations are only allowed in C99 mode

    比如写出下面这段程序: for (int i = 0; i < n; ++i) do_something(); 然后用gcc编译,会报 ‘for’ loop initial declaratio ...

  9. Android: Error inflating class android.support.v4.view.ViewPager 问题的解决方法

    ViewPager是个很好很强大的控件,很多应用用它来实现很酷的效果,但是很多情况下在运行时会遇到Error inflating class android.support.v4.view.ViewP ...

随机推荐

  1. CORS-跨域资源共享 解决跨域问题

    1.什么是跨域? a.test.com 和 b.test.com 是两个不同的域,而处于安全机制考虑,JS只能访问与所在页面同一个域(相同协议.域名.端口)的内容,但是我们在项目开发时,经常遇到一个页 ...

  2. 编写可维护的JavaScript-随笔(四)

    避免使用全局变量 一.全局变量带来的问题 a)      命名冲突 i.          当全局变量和全局函数越来越多时,发生命名冲突的概率也随之增高 ii.          如果函数中使用了外部 ...

  3. 面试题:栈的push和pop序列是否一致

    参数是两个数组,arr1,arr2 stack stack = new Stack() for(int i=0;j=0;i<arr1.length;i++){ stack.push(arr[i] ...

  4. MySQL登录时出现 Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES) 的原因及解决办法

    场景一:调试web程序访问数据库的时候出现 场景二:MySQL登陆的时候,区分本地localhost登陆,以及远程登陆.即使本地能够登陆,如果不授权也无法远程登陆 分析原因:(区分)当本地出现这样的情 ...

  5. docker cannot stop container问题解决

    docker 容器在启动时出现异常,删除容器或者暂停容器时会出现cannot stop container 先使用sudo aa-remove-unknown ,再进行其他操作 lgj@lgj-Len ...

  6. FFMPEG 命令行工具- ffplay

    ffplay 简介 ffplay是ffmpeg工程中提供的播放器,功能相当的强大,凡是ffmpeg支持的视音频格式它基本上都支持.甚至连VLC不支持的一些流媒体都可以播放,但是它的缺点是其不是图形化界 ...

  7. Prometheus(四):Prometheus+Alertmanager 配置邮件报警

    此处默认已安装Prometheus服务,服务地址:192.168.56.200  一.安装Alertmanager 此处采用源码编译的方式安装.首先下载alertmanager的软件包,下载地址:ht ...

  8. SaltStack--使用salt-ssh

    SaltStack使用salt-ssh模式 salt-ssh 介绍 参考官档 salt-ssh是 0.17.0 新引入的一个功能,不需要minion对客户端进行管理,也可以不需要master:salt ...

  9. maven nexus 私服搭建 Linux版

    准备工作 已安装jdk 已安装maven 下载Nexus Repository OSS:https://www.sonatype.com/download-oss-sonatype 如果无法下载成功, ...

  10. 不用图片做的三角语言框效果,纯样式编写,css三角样式写法

      2010-07-05 19:57:28 博主 回复 用户昵称 在秋日真的有轻柔吧. 上边效果与理想的有误差,代码布不上去,下边是源代码,另行保存后查看真正效果,下图是真正效果,区别在三角处,里面颜 ...