Can I use atoi to convert a text input to a dialog box to a double?
I need to do a calculation on several double values that have been input using a dialog box. I only know of ‘atoi’ but is this for integers only?
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.
Assuming Boost is an option, Boost.lexical_cast is a popular approach for converting to and from string representations of numerical values, e.g.: