<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[stl! getline &amp;amp;&amp;amp; float]]></title><description><![CDATA[<p>hi,<br />
wie kann ich ein float extrahieren?</p>
<pre><code class="language-cpp">string s;
//....
 ifstream ValueFile(filename.c_str());
if (! ValueFile) {
	// NO, abort program
	cerr &lt;&lt; &quot;can't open input file \&quot;&quot; &lt;&lt; filename &lt;&lt; &quot;\&quot;&quot;
		&lt;&lt; endl;
		exit(EXIT_FAILURE);
		}
 while(getline(ValueFile,s))
	{
	   s+='\n';
	   std::istringstream is(s);
	   is &gt;&gt; nT_ist &gt;&gt; std::scientific &gt;&gt; std::showpoint&gt;&gt; f_DeltaGain;
</code></pre>
<p>nu macht er aus f_DeltaGain immer ein int...<br />
wie extrahiere ich ein float?</p>
<p>danke</p>
<p>Theresa</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/161478/stl-getline-amp-amp-float</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 19:59:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/161478.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Oct 2006 07:03:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to stl! getline &amp;amp;&amp;amp; float on Sat, 07 Oct 2006 07:03:18 GMT]]></title><description><![CDATA[<p>hi,<br />
wie kann ich ein float extrahieren?</p>
<pre><code class="language-cpp">string s;
//....
 ifstream ValueFile(filename.c_str());
if (! ValueFile) {
	// NO, abort program
	cerr &lt;&lt; &quot;can't open input file \&quot;&quot; &lt;&lt; filename &lt;&lt; &quot;\&quot;&quot;
		&lt;&lt; endl;
		exit(EXIT_FAILURE);
		}
 while(getline(ValueFile,s))
	{
	   s+='\n';
	   std::istringstream is(s);
	   is &gt;&gt; nT_ist &gt;&gt; std::scientific &gt;&gt; std::showpoint&gt;&gt; f_DeltaGain;
</code></pre>
<p>nu macht er aus f_DeltaGain immer ein int...<br />
wie extrahiere ich ein float?</p>
<p>danke</p>
<p>Theresa</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1150896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1150896</guid><dc:creator><![CDATA[Theresa]]></dc:creator><pubDate>Sat, 07 Oct 2006 07:03:18 GMT</pubDate></item><item><title><![CDATA[Reply to stl! getline &amp;amp;&amp;amp; float on Sat, 07 Oct 2006 07:33:27 GMT]]></title><description><![CDATA[<p>hat sich erledigt....<br />
float im file hat keinen Dezimalpunkt, also 2.54, sondern Komma (2,54)<br />
...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1150898</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1150898</guid><dc:creator><![CDATA[Theresa]]></dc:creator><pubDate>Sat, 07 Oct 2006 07:33:27 GMT</pubDate></item></channel></rss>