如果我有以下声明:
float a = 3.0 ;
那是一个错误吗?我在一本书中读到了3.0一个double值,我必须将其指定为float a = 3.0f.是这样吗?
3.0
double
float a = 3.0f
c++ c++11
c++ ×1
c++11 ×1