Note that in general, double is different from long double.
strtod converts string to double, but which function should be use to converting string to long double?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In C++03, use
boost::lexical_cast, or:In C99, use
strtold.In C89, use
sscanfwith%Lg.In C++11 use
stold.There may be subtle differences as to exactly which formats each one accepts, so check the details first…