loop+initial+deelaration+used+ontside+C99+mode
时间: 2023-10-31 15:06:07 浏览: 48
这个错误提示表示在C语言中使用了早期版本的循环初始化语法。在C99标准中,可以在循环中直接定义变量,而不需要在循环之前声明变量。
例如,在C99中,可以写成:
for(int i = 0; i < n; i++){
// 循环体
}
而在早期版本的C语言中,需要先在循环之前声明变量:
int i;
for(i = 0; i < n; i++){
// 循环体
}
如果要在早期版本的C语言中使用循环初始化语法,可以在编译时加上-c99选项或者将代码改为符合早期C语言标准的语法。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)