<?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[iteratoren &amp;amp; templates - wie funktoniert es?]]></title><description><![CDATA[<p>Grüße,</p>
<p>Ich wollte mal fragen ob irgendwer ein gutes Tutorial für das Thema iteratoren in templates kennt. Die bisherigen haben mir irgendwie alle nicht weiter geholfen.</p>
<p>Steh da momentan irgendwie an.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/214016/iteratoren-amp-templates-wie-funktoniert-es</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 18:40:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/214016.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 May 2008 15:49:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 15:49:56 GMT]]></title><description><![CDATA[<p>Grüße,</p>
<p>Ich wollte mal fragen ob irgendwer ein gutes Tutorial für das Thema iteratoren in templates kennt. Die bisherigen haben mir irgendwie alle nicht weiter geholfen.</p>
<p>Steh da momentan irgendwie an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515856</guid><dc:creator><![CDATA[abzy]]></dc:creator><pubDate>Sat, 24 May 2008 15:49:56 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 15:50:54 GMT]]></title><description><![CDATA[<p>Lies ein Buch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515857</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Sat, 24 May 2008 15:50:54 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 15:53:30 GMT]]></title><description><![CDATA[<p>hab ich - das hilft mir nur leider nicht weiter</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515858</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515858</guid><dc:creator><![CDATA[abzy]]></dc:creator><pubDate>Sat, 24 May 2008 15:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 16:17:34 GMT]]></title><description><![CDATA[<p>Um dir weiter helfen zu können musst du erst mal alle tuts und bücher auflisten die du schon gelesen hast</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515882</guid><dc:creator><![CDATA[wasserspiele]]></dc:creator><pubDate>Sat, 24 May 2008 16:17:34 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 16:23:40 GMT]]></title><description><![CDATA[<p>also um das konkret anzugehen:</p>
<p>ich habe ein template vector und diesen will ich nach einem element durchsuchen, aber hab probleme mit dem iterator, denn der nimmt das einfach nicht so an wie ich will und zwar kommt ständig diese Fehermeldung (&quot;Human&quot; ersetzt dann das T):</p>
<pre><code class="language-cpp">error: no match for 'operator!=' in '(&amp;iter)-&gt;__gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;::operator* [with _Iterator = Human*, _Container = std::vector&lt;Human, std::allocator&lt;Human&gt; &gt;]() != y'
</code></pre>
<p>und das wäre der codeschnipsel dazu:</p>
<pre><code class="language-cpp">void add (T x,T y)
	{
	std::vector&lt;T&gt; myVec;

		typename std::vector&lt;T&gt;::iterator iter=myVec.begin();

		while (iter != myVec.end() &amp;&amp; *iter != x){
			myVec.push_back(x);
			vec_idx++;
		}
	}
</code></pre>
<p>Was mache ich falsch? Hoffe ihr könnt mir helfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515885</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515885</guid><dc:creator><![CDATA[abzy]]></dc:creator><pubDate>Sat, 24 May 2008 16:23:40 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 16:30:25 GMT]]></title><description><![CDATA[<p>Das ist kein Problem der Iteratoren. Du vergleichst das, worauf der Iterator zeigt, mit einem normalen Objekt der Klasse Human. Diese Klasse hat offensichtlich keinen operator!=.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515888</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Sat, 24 May 2008 16:30:25 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 16:30:32 GMT]]></title><description><![CDATA[<p>hat T vielleicht keinen operator!= definiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515889</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515889</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Sat, 24 May 2008 16:30:32 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 16:45:07 GMT]]></title><description><![CDATA[<p>ok danke, aber die &quot;begin&quot; methode liefert ja einen iterator, wie kann ich das problem am besten lösen? ... also versteh noch nicht ganz wie ich das am besten umgehen soll...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515893</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515893</guid><dc:creator><![CDATA[abzy]]></dc:creator><pubDate>Sat, 24 May 2008 16:45:07 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 16:50:49 GMT]]></title><description><![CDATA[<p>Mit den Iteratoren hat das immernoch nichts zu tun. Das würde auch passieren, wenn Du &quot;x != x&quot; schreibst.</p>
<p>Spendiere der Klasse Human einen operator!=.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515899</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515899</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Sat, 24 May 2008 16:50:49 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 17:10:22 GMT]]></title><description><![CDATA[<p>Auch wenn diese Frage sicher total doof ist aber:<br />
Ist nicht != ein Standardoperator?<br />
Ich muss ja gestehen das ich gar nicht weiß was ihr damit meint das ich Human einen Operator geben soll. Also bisher habe ich noch nie irgendeiner Klasse einen Operator gegeben.</p>
<p>Wäre da auch für jeden weiterführenden Link sehr dankbar.</p>
<p>Grüße<br />
Daniel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515906</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515906</guid><dc:creator><![CDATA[abzy]]></dc:creator><pubDate>Sat, 24 May 2008 17:10:22 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 17:19:38 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">class Human // hast du laut fehlermeldung irgendwo mal gschrieben
{
    // viel blubb hier, aber kein operator!=
};

...

Human a;
Human b;

if(a != b) // nein, nicht möglich, was soll er denn vergleichen? alle member-variablen? nur bestimmte? ganz was anderes?
</code></pre>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515908</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Sat, 24 May 2008 17:19:38 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 18:12:24 GMT]]></title><description><![CDATA[<p>Wenn du nur feststellen willst, ob es das gleiche Objekt ist, dann reicht Pointervergleich und dafür musst du nix schreiebn.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1515936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1515936</guid><dc:creator><![CDATA[Friedenspanzer]]></dc:creator><pubDate>Sat, 24 May 2008 18:12:24 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Sat, 24 May 2008 21:04:01 GMT]]></title><description><![CDATA[<p>Ehm, ich empfehle dringend ein C++ Tutorial, sei es noch so kurz. Zum Beispiel das hier:<br />
<a href="http://www.cplusplus.com/doc/tutorial/" rel="nofollow">http://www.cplusplus.com/doc/tutorial/</a></p>
<p>Da hast du dann auch sowas drin, wie Operatoren überladen:<br />
<a href="http://www.cplusplus.com/doc/tutorial/classes2.html" rel="nofollow">http://www.cplusplus.com/doc/tutorial/classes2.html</a></p>
<p>Und der Titel des Threads ist nun etwas falsch gewählt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1516024</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1516024</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Sat, 24 May 2008 21:04:01 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Mon, 26 May 2008 13:47:03 GMT]]></title><description><![CDATA[<p>ich finde das übrigens völlig unöglich das c++ keinen standard operator ==<br />
schreibt,<br />
1 . meistens ist es eh ein vergleich aller member</p>
<p>2 . erweitert man die klasse um ein member,<br />
vergisst man leicht, das man man operator== auch noch anpassen muss</p>
<p>3. operator = wird ja auch vordefiniert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1516957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1516957</guid><dc:creator><![CDATA[operator==]]></dc:creator><pubDate>Mon, 26 May 2008 13:47:03 GMT</pubDate></item><item><title><![CDATA[Reply to iteratoren &amp;amp; templates - wie funktoniert es? on Mon, 26 May 2008 14:21:20 GMT]]></title><description><![CDATA[<p>ist ja ein crosspost: <a href="http://entwickler-forum.de/showthread.php?t=48497" rel="nofollow">http://entwickler-forum.de/showthread.php?t=48497</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1516978</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1516978</guid><dc:creator><![CDATA[simon.gysi]]></dc:creator><pubDate>Mon, 26 May 2008 14:21:20 GMT</pubDate></item></channel></rss>