I am looking for a function similar to atol
(char * to long int) but atofl
(char to long double), does anyone know of a library that does this, or a simple way to do this, since using
atof
on "0.00000005" casts off the 5?
Thanks.
相关问题
- Multiple sockets for clients to connect to
- Do the Java Integer and Double objects have unnece
- how to split a list into a given number of sub-lis
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
There is a function called
strtod
that does what you want.I think you have use the wrong argument of printf, so you only saw the console giving you "0.000000", you can try
to show the your number, and you will find what you want.