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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/16 19:18:17
格式‘%f’expectsargumentoftype‘float*’,butargument2hastype‘double*’[-Wformat]Is"f"availableforbothfloat

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