ISO C90不允许在C混合声明和code [英] ISO C90 forbids mixed declarations and code in C
本文介绍了ISO C90不允许在C混合声明和code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我宣布这样一个变量:
int i = 0;
我得到警告:
ISO C90不允许混合使用声明和code
ISO C90 forbids mixed declarations and code
我怎样才能解决这个问题?
How can I fix it?
推荐答案
我觉得你应该变量声明移到框的顶部。即。
I think you should move the variable declaration to top of block. I.e.
{
foo();
int i = 0;
bar();
}
到
{
int i = 0;
foo();
bar();
}
这篇关于ISO C90不允许在C混合声明和code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文