I need some help. I have to convert and STORE a char * into a double or long double without losing precision.
Indeed, i tried to use strtold and atof methods (also strtold), but these methods are rounding the value.
For example:
char * key ="39.7519707";
double ld =strtod((char*)key,NULL);
printf("%lf", ld);
prints : 39.751971
but printf("%6.7f",ld)
gives me the right value but I couldn't store into a variable.