<?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 direkt in Objektvariable schreiben]]></title><description><![CDATA[<p>Hallo !</p>
<p>Folgendes funktioniert anscheined nicht: (Werte stimmen nicht)</p>
<pre><code class="language-cpp">void Class::AnMethode(AnotherClass* anotherClass)
{
   ...
   stringstream tmpStream;
   tmpStream.str(&quot;TEST&quot;);
   tmpStream &gt;&gt; anotherClass-&gt;AVariable;

   cout &lt;&lt; anotherClass-&gt;AVariable; // ergibt nicht &quot;TEST&quot; sondern zB -81545456
// AVariable ist public
}
</code></pre>
<p>Danke und mfg leon22</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/220908/stringstream-direkt-in-objektvariable-schreiben</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 14:09:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/220908.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 22 Aug 2008 15:32:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to stringstream direkt in Objektvariable schreiben on Fri, 22 Aug 2008 15:32:14 GMT]]></title><description><![CDATA[<p>Hallo !</p>
<p>Folgendes funktioniert anscheined nicht: (Werte stimmen nicht)</p>
<pre><code class="language-cpp">void Class::AnMethode(AnotherClass* anotherClass)
{
   ...
   stringstream tmpStream;
   tmpStream.str(&quot;TEST&quot;);
   tmpStream &gt;&gt; anotherClass-&gt;AVariable;

   cout &lt;&lt; anotherClass-&gt;AVariable; // ergibt nicht &quot;TEST&quot; sondern zB -81545456
// AVariable ist public
}
</code></pre>
<p>Danke und mfg leon22</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1569716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1569716</guid><dc:creator><![CDATA[leon22]]></dc:creator><pubDate>Fri, 22 Aug 2008 15:32:14 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream direkt in Objektvariable schreiben on Fri, 22 Aug 2008 15:48:32 GMT]]></title><description><![CDATA[<p>Probiers mal so:</p>
<pre><code class="language-cpp">tmpStream &lt;&lt; &quot;TEST&quot;;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1569726</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1569726</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Fri, 22 Aug 2008 15:48:32 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream direkt in Objektvariable schreiben on Fri, 22 Aug 2008 17:31:49 GMT]]></title><description><![CDATA[<p>Möglicherweise sind die Fehlerflags (am wahrscheinlichsten ist EOF) gesetzt, dann werden Operationen auf dem Stream nicht mehr ausgeführt. Überprüf das mit <code>std::stringstream::good()</code> und setze die Flags zurück mit <code>std::stringstream::clear()</code> .</p>
<p>Edit: Hast du da keine anderen Operationen und Funktionsaufrufe dazwischen? Denn das sollte eigentlich nicht passieren...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1569776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1569776</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Fri, 22 Aug 2008 17:31:49 GMT</pubDate></item><item><title><![CDATA[Reply to stringstream direkt in Objektvariable schreiben on Fri, 22 Aug 2008 17:32:38 GMT]]></title><description><![CDATA[<p>welchen typ hat AVariable?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1569778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1569778</guid><dc:creator><![CDATA[und]]></dc:creator><pubDate>Fri, 22 Aug 2008 17:32:38 GMT</pubDate></item></channel></rss>