I am getting the following errors:
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]
In the below code:
#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);
}
As far as I know the format specifier of a long double
is %Lf
so not really sure how to solve this one. Thank you!
Compiled with TDM-GCC 4.9.2 64-bit Release
in DEV-C++.