<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
You can use an istringstream, defined in <sstring>:<br>
<blockquote><tt>#include <sstring>        // includes etc<br>
#include <string><br>
using namespace std;<br>
  <br>
string         snum = "1.23456";<br>
float          fnum;<br>
istringstream  stream(snum);<br>
  <br>
  </tt><tt>stream >> fnum;           // Tada! fnum = 1.23456<br>
  </tt></blockquote>
However, this is the kdevelop mailing list, and plain C++ questions should
probably not be discussed here. You could always try comp.lang.c++ (Although
always read the FAQ first! ;-) )<br>
<br>
cheers,<br>
<br>
Tim<br>
<br>
<br>
<br>
Martin Bammer wrote:<br>
<blockquote type="cite"
 cite="mid200210302139.06545.e9525103@stud4.tuwien.ac.at">
  <pre wrap="">How do convert a string into a floating point value in C++????

-
to unsubscribe from this list send an email to <a class="moz-txt-link-abbreviated" href="mailto:kdevelop-request@kdevelop.org">kdevelop-request@kdevelop.org</a> with the following body:
unsubscribe »your-email-address«
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="$mailwrapcol">-- 

Tim Aidley
Research and Development
Framestore-CFC
<a class="moz-txt-link-abbreviated" href="mailto:tim.aidley@framestore-cfc.com">tim.aidley@framestore-cfc.com</a></pre>
<br>
</body>
</html>