C语言遇到的一些问题
(1)编译出现ISO C90 forbids mixed declarations and code 警告
原因:
在函数中非变量定义的语句后又定义了一个变量。
如下示:
int a;
a = 5;
int b;
解决办法:
将变量定义移到非变量定义之前。如下:
int a;
int b;
a = 5;
C语言遇到的一些问题
(1)编译出现ISO C90 forbids mixed declarations and code 警告
原因:
在函数中非变量定义的语句后又定义了一个变量。
如下示:
int a;
a = 5;
int b;
解决办法:
将变量定义移到非变量定义之前。如下:
int a;
int b;
a = 5;