keil5编写stm32代码:提示single-precision operand implicity converted to double-precesion

  使用keil5编写stm32代码,编译提示single-precision operand implicity converted to double-precesion,意思是单精度运算隐式转换成双精度运算了,可以忽略这个警告,也可以在所有的浮点数字后面加上f,警告就会消失。

比如:float a=0.4f,b=0.0f;

b=10.0f*5*a;

这样就不会出现这个警告了,注意一定在所有的浮点数字后面加上f。




猜你喜欢

转载自blog.csdn.net/junyilao/article/details/80054550