格式 ‘%f’ expects argument of type ‘float *’,but argument 2 has type ‘double *’ [-Wformat]Is "f" available for both float and double

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 09:12:09

格式 ‘%f’ expects argument of type ‘float *’,but argument 2 has type ‘double *’ [-Wformat]Is "f" available for both float and double
格式 ‘%f’ expects argument of type ‘float *’,but argument 2 has type ‘double *’ [-Wformat]
Is "f" available for both float and double

格式 ‘%f’ expects argument of type ‘float *’,but argument 2 has type ‘double *’ [-Wformat]Is "f" available for both float and double
double 应该用 %lf
long double 用 %Lf