warning:ISO0 C90 forbids mixed declarations and code

来源:互联网 发布:皇甫圣华淘宝店 编辑:程序博客网 时间:2024/05/22 00:05

原因:定义变量前面有非定义变量的语句,比如

printf("hello world!!!");

int i;

这样就会出现警告。

解决办法:将定义变量的语句放在前面即可,也就是把int i放在printf前面。


原创粉丝点击