Deer Enginneer:
I try to get a double number from a const char*, use function "strtod" of
"stdlib.h"
Program run well in ubuntu, but return "nan" in imx6ulevk.
My system version is : 2015.04-imx_v2015.04_3.14.38_6ul_ga+g5d63276
It seem like something wrong in stdlib, Could you pls give me some advise?
Looking forwared your kindly reply.
The test demo :
------------------------------------------------------------------------------
/* strtod example */
#include <stdio.h>
#include <stdlib.h>
int main ()
{
float f;
char *str = "12345.67";
f = strtod(str, NULL);
printf("string = %s float = %f\n", str, f);
return 0;
}
-------------------------------------------------------------------------------------------
------------------
BestRegards
夏星(xiaxing)
深圳市雪锐科技有限公司--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale