i am using 'atof' function to convert string into double but it shows the correct value if the string length is 17(max). is ther any function if string length is more than 17?
Does the string represent a valid double value? If not, then you won't find a conversion function that works without first getting a library that supports larger floating point values.
the string contains only the numerals from 0-9.
That's only a partial test. A string can contain only digits and still be out of range for the target type. If it's out of range, trying to convert the string to the target type will be undefined.
I was going to roll my own, but this works just fine.
Adapt it to eliminate the bools if you need to, but the code should work just fine.