<?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[Container Problem]]></title><description><![CDATA[<p>Hallo ich hab ein Interface Element<br />
das Interf. wird von der Klasse Name Implementiert das geht auch soweit</p>
<p>Nun gibt es noch eine Klasse Daten die in einem Cont Vector die Daten der Klasse<br />
Name abscpeichert.</p>
<p>[cpp]<br />
class Daten<br />
{<br />
public:</p>
<p>void checkIn(Element *pe)<br />
{<br />
cont.push_front(pe);<br />
cout &lt;&lt; pelem; //hier möchte ich nochmal meine eingelesenen daten sehen<br />
it = cont.begin();<br />
cout &lt;&lt; **it; //geht auch nicht</p>
<p>private:</p>
<p>list&lt;Element *&gt; cont;<br />
list&lt;Element *&gt;::iterator it;<br />
};</p>
<p>Versucht habe ich eine globale Operatorfunktion er springt zwar rein macht<br />
aber das falsche diese Funktion habe ich dann als friend in der Klasse<br />
Daten implementiert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/243608/container-problem</link><generator>RSS for Node</generator><lastBuildDate>Sat, 19 Sep 2026 22:19:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/243608.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Jun 2009 19:54:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Container Problem on Thu, 18 Jun 2009 19:54:37 GMT]]></title><description><![CDATA[<p>Hallo ich hab ein Interface Element<br />
das Interf. wird von der Klasse Name Implementiert das geht auch soweit</p>
<p>Nun gibt es noch eine Klasse Daten die in einem Cont Vector die Daten der Klasse<br />
Name abscpeichert.</p>
<p>[cpp]<br />
class Daten<br />
{<br />
public:</p>
<p>void checkIn(Element *pe)<br />
{<br />
cont.push_front(pe);<br />
cout &lt;&lt; pelem; //hier möchte ich nochmal meine eingelesenen daten sehen<br />
it = cont.begin();<br />
cout &lt;&lt; **it; //geht auch nicht</p>
<p>private:</p>
<p>list&lt;Element *&gt; cont;<br />
list&lt;Element *&gt;::iterator it;<br />
};</p>
<p>Versucht habe ich eine globale Operatorfunktion er springt zwar rein macht<br />
aber das falsche diese Funktion habe ich dann als friend in der Klasse<br />
Daten implementiert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729074</guid><dc:creator><![CDATA[mikke16]]></dc:creator><pubDate>Thu, 18 Jun 2009 19:54:37 GMT</pubDate></item><item><title><![CDATA[Reply to Container Problem on Fri, 19 Jun 2009 00:58:33 GMT]]></title><description><![CDATA[<p>ich weiß nicht, wie es dem rest geht - aber ich versteh nicht so genau, was du willst...<br />
versuchs ma noch ma - am besten in dem du es mal vollständig beschreibst ^^</p>
<p>aber:<br />
wieso hast du ne liste aus pointern und nicht das element an sich?<br />
wieso hast du nen iterator als klassenmember? sieht iwie so aus, als ob das unnötig wäre...</p>
<p>zu dem code-schnipsel an sich:</p>
<pre><code class="language-cpp">void checkIn(Element *pe) 
{ 
cout &lt;&lt; *pe &lt;&lt; endl;

cont.push_front(pe); 
it = cont.begin(); 

cout &lt;&lt; **it &lt;&lt; endl;
}
</code></pre>
<p>sollte aber gehen...</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729184</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 19 Jun 2009 00:58:33 GMT</pubDate></item><item><title><![CDATA[Reply to Container Problem on Fri, 19 Jun 2009 10:17:01 GMT]]></title><description><![CDATA[<p>Habs schon gelöst der Container speicher ja nur adressen von Objekten ab</p>
<p>ich hab alte Prüfungen durchgearbeitet und sie dann noch ergänzt<br />
dort wurde halt alles in diesen Con abgespeichert und nie mehr ausgelesen</p>
<p>wenn ich zb 1 Objekt erzeuge und mit diesen 10 Datensätze per Tastatur eingeben<br />
will dann hab ich im Cont 10 mal die gleiche Adresse stehen wunderbar</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729334</guid><dc:creator><![CDATA[mikke16]]></dc:creator><pubDate>Fri, 19 Jun 2009 10:17:01 GMT</pubDate></item><item><title><![CDATA[Reply to Container Problem on Fri, 19 Jun 2009 11:40:35 GMT]]></title><description><![CDATA[<p>mikke16 schrieb:</p>
<blockquote>
<p>wenn ich zb 1 Objekt erzeuge und mit diesen 10 Datensätze per Tastatur eingeben<br />
will dann hab ich im Cont 10 mal die gleiche Adresse stehen wunderbar</p>
</blockquote>
<p>aber nur, wenn du es falsch anstellst ^^<br />
wenn du hilfe willst, müsstest du mal das stück quellcode zeigen, wie du es aufrufst - dann könnte man dir da auch helfen ;o)</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729383</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 19 Jun 2009 11:40:35 GMT</pubDate></item><item><title><![CDATA[Reply to Container Problem on Fri, 19 Jun 2009 14:39:23 GMT]]></title><description><![CDATA[<p>man muss halt dann mir new arbeiten<br />
zumindest hab ich es jetzt mal so abgeändert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729537</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729537</guid><dc:creator><![CDATA[mikke16]]></dc:creator><pubDate>Fri, 19 Jun 2009 14:39:23 GMT</pubDate></item><item><title><![CDATA[Reply to Container Problem on Fri, 19 Jun 2009 14:56:35 GMT]]></title><description><![CDATA[<p>mikke16 schrieb:</p>
<blockquote>
<p>man muss halt dann mir new arbeiten<br />
zumindest hab ich es jetzt mal so abgeändert</p>
</blockquote>
<p>klingt gut - wenn du auch an das delete beim aufräumen denkst ^^</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729550</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 19 Jun 2009 14:56:35 GMT</pubDate></item></channel></rss>