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

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 12:37:44
格式 ‘%f’ expects argument of type ‘float *’,but argument 2 has type ‘double *’ [-Wformat]Is

格式 ‘%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