<?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[stringstream mehrmals benutzen]]></title><description><![CDATA[<p>Hi. Ich habe eine Schleife in welcher ich strings in ints umwandele. Dies mache ich mit</p>
<pre><code class="language-cpp">timeTemp &lt;&lt; timeString.substr(0, 2);
timeTemp &gt;&gt; timetmp;
</code></pre>
<p>timeTemp ist ein stringstream und timetmp ein int.<br />
Allerdings &quot;blockieren&quot; die stringstream nach einmal benutzen. Jedenfalls bleibt der Wert, welchen ich als erstes hineingeschrieben habe immer stehen.<br />
Wie kann ich einen stringstream &quot;resetten&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252572/stringstream-mehrmals-benutzen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 09:29:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252572.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Oct 2009 16:27:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to stringstream mehrmals benutzen on Wed, 21 Oct 2009 16:27:15 GMT]]></title><description><![CDATA[<p>Hi. Ich habe eine Schleife in welcher ich strings in ints umwandele. Dies mache ich mit</p>
<pre><code class="language-cpp">timeTemp &lt;&lt; timeString.substr(0, 2);
timeTemp &gt;&gt; timetmp;
</code></pre>
<p>timeTemp ist ein stringstream und timetmp ein int.<br />
Allerdings &quot;blockieren&quot; die stringstream nach einmal benutzen. Jedenfalls bleibt der Wert, welchen ich als erstes hineingeschrieben habe immer stehen.<br />
Wie kann ich einen stringstream &quot;resetten&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795891</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795891</guid><dc:creator><![CDATA[Shuriken2643]]></dc:creator><pubDate>Wed, 21 Oct 2009 16:27:15 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream mehrmals benutzen on Wed, 21 Oct 2009 16:29:34 GMT]]></title><description><![CDATA[<p>timeTemp.str(&quot;&quot;);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795893</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795893</guid><dc:creator><![CDATA[Mr X]]></dc:creator><pubDate>Wed, 21 Oct 2009 16:29:34 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream mehrmals benutzen on Wed, 21 Oct 2009 16:30:57 GMT]]></title><description><![CDATA[<p>Hi, das habe ich schon ausprobiert und funktioniert nicht. Problem tritt weiterhin auf.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795894</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795894</guid><dc:creator><![CDATA[Shuriken2643]]></dc:creator><pubDate>Wed, 21 Oct 2009 16:30:57 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream mehrmals benutzen on Wed, 21 Oct 2009 16:32:59 GMT]]></title><description><![CDATA[<p>Shuriken2643 schrieb:</p>
<blockquote>
<p>Hi, das habe ich schon ausprobiert und funktioniert nicht. Problem tritt weiterhin auf.</p>
</blockquote>
<p>Bei der einen Gelegenheit wo ich das gebraucht habe, ging das. Zeig mal mehr Code.<br />
Was spricht gegen einen neuen Stream?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795896</guid><dc:creator><![CDATA[Registrierter Troll]]></dc:creator><pubDate>Wed, 21 Oct 2009 16:32:59 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream mehrmals benutzen on Wed, 21 Oct 2009 16:34:44 GMT]]></title><description><![CDATA[<p>timeTemp.flush();</p>
<p>könnte vielleicht helfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795897</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795897</guid><dc:creator><![CDATA[Mr X]]></dc:creator><pubDate>Wed, 21 Oct 2009 16:34:44 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream mehrmals benutzen on Wed, 21 Oct 2009 16:35:47 GMT]]></title><description><![CDATA[<p>Shuriken2643 schrieb:</p>
<blockquote>
<p>Hi, das habe ich schon ausprobiert und funktioniert nicht.</p>
</blockquote>
<p>Prüfe mal die Streamflags und setze sie wenn nötig zurück.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795899</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795899</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 21 Oct 2009 16:35:47 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream mehrmals benutzen on Wed, 21 Oct 2009 16:42:57 GMT]]></title><description><![CDATA[<p>Okay, hier ist mehr Code:</p>
<p>Edit2: clear() hat funktioniert. Danke für alle Antworten!</p>
<p>Edit: Zu spät gesehen. Ich probiere das mit dne Flags mal. flush() hatte ich auch schon ausprobiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795901</guid><dc:creator><![CDATA[Shuriken2643]]></dc:creator><pubDate>Wed, 21 Oct 2009 16:42:57 GMT</pubDate></item></channel></rss>