我收到以下错误:
In function 'main':
[Warning] unknown conversion type character 'L' in format [-Wformat=]
[Warning] too many arguments for format [-Wformat-extra-args]
In function 'error_user':
[Warning] unknown conversion type character 'L' in format [-Wformat=]
[Warning] too many arguments for format [-Wformat-extra-args]
在下面的代码中:
#include <stdio.h>
#include <stdlib.h>
void error_user (long double *error);
int main(void)
{
long double error;
printf("What error do you want?\n");
error_user (&error);
printf("%Lf\n", error);
return 0;
}
void error_user (long double *error)
{
scanf("%Lf", error);
}
据我所知,a 的格式说明符long double
不太%Lf
确定如何解决这个问题。谢谢!
TDM-GCC 4.9.2 64-bit Release
在DEV-C++中编译。