convert a string to a double?

How do you convert a string to a double I was looking at http://www.cplusplus.com/reference/clibrary/cstdlib/atof/ but i don't really understand it. I was trying to do double Temperature_2(Temperature.c_str()); but that doesn't seem to work
double Temperature_2 = atof(Temperature.c_str()); is what you need i believe
http://www.cplusplus.com/articles/numb_to_text/
^ updated version of moorecm link
Ah, thanks. I didn't look in the actual Articles section.
thanks for the help
Topic archived. No new replies allowed.