cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
convert a string to a double?
convert a string to a double?
Jun 25, 2010 at 4:29pm UTC
cmccmc
(103)
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
Jun 25, 2010 at 4:32pm UTC
moorecm
(1932)
http://www.cplusplus.com/forum/articles/9645/
Jun 25, 2010 at 4:33pm UTC
spaggy
(115)
double
Temperature_2 = atof(Temperature.c_str());
is what you need i believe
Jun 25, 2010 at 4:52pm UTC
Bazzy
(6281)
http://www.cplusplus.com/articles/numb_to_text/
^ updated version of
moorecm
link
Jun 25, 2010 at 4:53pm UTC
moorecm
(1932)
Ah, thanks. I didn't look in the actual Articles
section
.
Jun 25, 2010 at 4:54pm UTC
cmccmc
(103)
thanks for the help
Topic archived. No new replies allowed.