<?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[for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso?]]></title><description><![CDATA[<p>Hi,<br />
also langsam hab ich keine Ahnung mehr wie der Compiler tickt. Ständig nur am meckern und nun will er nicht mal mehr das fressen:</p>
<pre><code class="language-cpp">list&lt; LISTE &gt; vList;
list&lt; LISTE &gt;::iterator iter;
for( iter = vList.begin( ); iter != vList.end( ); iter++ ) {

}
</code></pre>
<p>Meldung:</p>
<pre><code>1&gt;------ Build started: Project: ParsIT, Configuration: Debug Win32 ------
1&gt;Linking...
1&gt;ParsIT.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function &quot;public: class std::list&lt;int,class std::allocator&lt;int&gt; &gt;::_Const_iterator&lt;1&gt; &amp; __thiscall std::list&lt;int,class std::allocator&lt;int&gt; &gt;::_Const_iterator&lt;1&gt;::operator++(void)&quot; (??E?$_Const_iterator@$00@?$list@HV?$allocator@H@std@@@std@@QAEAAV012@XZ)
1&gt;C:\Dokumente und Einstellungen\Steiner\Eigene Dateien\Visual Studio 2008\Projects\ParsIT\Debug\ParsIT.exe : fatal error LNK1120: 1 unresolved externals
1&gt;ParsIT - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
</code></pre>
<p>Hat einer ne Ahnung was da abgeht?, bzw was nicht geht?</p>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/209101/for-iter-vlist-begin-iter-vlist-end-iter-geht-nicht-wieso</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 09:21:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/209101.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Mar 2008 17:10:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 17:10:36 GMT]]></title><description><![CDATA[<p>Hi,<br />
also langsam hab ich keine Ahnung mehr wie der Compiler tickt. Ständig nur am meckern und nun will er nicht mal mehr das fressen:</p>
<pre><code class="language-cpp">list&lt; LISTE &gt; vList;
list&lt; LISTE &gt;::iterator iter;
for( iter = vList.begin( ); iter != vList.end( ); iter++ ) {

}
</code></pre>
<p>Meldung:</p>
<pre><code>1&gt;------ Build started: Project: ParsIT, Configuration: Debug Win32 ------
1&gt;Linking...
1&gt;ParsIT.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function &quot;public: class std::list&lt;int,class std::allocator&lt;int&gt; &gt;::_Const_iterator&lt;1&gt; &amp; __thiscall std::list&lt;int,class std::allocator&lt;int&gt; &gt;::_Const_iterator&lt;1&gt;::operator++(void)&quot; (??E?$_Const_iterator@$00@?$list@HV?$allocator@H@std@@@std@@QAEAAV012@XZ)
1&gt;C:\Dokumente und Einstellungen\Steiner\Eigene Dateien\Visual Studio 2008\Projects\ParsIT\Debug\ParsIT.exe : fatal error LNK1120: 1 unresolved externals
1&gt;ParsIT - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
</code></pre>
<p>Hat einer ne Ahnung was da abgeht?, bzw was nicht geht?</p>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480835</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480835</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 17:10:36 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 17:12:44 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>mal nen &quot;Rebuild All&quot; probiert ? Dein Code ist richtig, der Compiler meckert ja auch nicht, es ist der Linker der sich hier beschwert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480836</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480836</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 26 Mar 2008 17:12:44 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 17:14:38 GMT]]></title><description><![CDATA[<p>Komisch wenn ich auf release stelle gehts...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480838</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480838</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 17:14:38 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 17:36:13 GMT]]></title><description><![CDATA[<p>hast du im debug mode auch alle notwendigen libs angegeben?<br />
vergleich doch die release libs mit denen im debug mode...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480854</guid><dc:creator><![CDATA[muffmolch]]></dc:creator><pubDate>Wed, 26 Mar 2008 17:36:13 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:15:06 GMT]]></title><description><![CDATA[<p>Jo, ich lass das jetzt so. Aber sorry wenn ich hier noch etwas anderes posten muss, wollte aba net extra neuen Thread aufmachen. und zwar funktioniert hier die .sort der liste nicht, obwohl ich doch den '&lt;' operator ueberladen habe?</p>
<pre><code class="language-cpp">struct LISTE {

	char szCountry2[  8 ];
	char szCountry3[  8 ];
	char szFullName[ 64 ];

	bool operator &lt;( const LISTE *newItem ) const {

		return( this-&gt;szFullName &lt; newItem-&gt;szFullName );
	}
};
</code></pre>
<p>Meldung:</p>
<pre><code>1&gt;C:\Programme\Microsoft Visual Studio 9.0\VC\include\list(993) : error C2679: binary '&lt;' : no operator found which takes a right-hand operand of type 'LISTE' (or there is no acceptable conversion)
1&gt;        .\ParsIT.cpp(13): could be 'bool LISTE::operator &lt;(const LISTE *) const'
1&gt;        while trying to match the argument list '(LISTE, LISTE)'
1&gt;        C:\Programme\Microsoft Visual Studio 9.0\VC\include\list(984) : while compiling class template member function 'void std::list&lt;_Ty&gt;::merge(std::list&lt;_Ty&gt; &amp;)'
1&gt;        with
1&gt;        [
1&gt;            _Ty=LISTE
1&gt;        ]
1&gt;        .\ParsIT.cpp(19) : see reference to class template instantiation 'std::list&lt;_Ty&gt;' being compiled
1&gt;        with
1&gt;        [
1&gt;            _Ty=LISTE
1&gt;        ]
</code></pre>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480864</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:15:06 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:25:25 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">struct LISTE {

	char szCountry2[  8 ];
	char szCountry3[  8 ];
	char szFullName[ 64 ];

	bool operator &lt;( const LISTE *newItem ) const {

		return( this-&gt;szFullName &lt; newItem-&gt;szFullName );
	}
};
</code></pre>
<p>--&gt;</p>
<pre><code class="language-cpp">struct LISTE {

	char szCountry2[  8 ];
	char szCountry3[  8 ];
	char szFullName[ 64 ];

	bool operator &lt;( const LISTE &amp;newItem ) const {

		return( this-&gt;szFullName &lt; newItem.szFullName );
	}
};
</code></pre>
<p>Edit:</p>
<p>Außerdem bin ich mir nicht sicher, ob man bei arrays einfach größer/kleiner Vergleiche durchführen kann.<br />
(mit lexicographical_compare() oder so dürfte es aber gehen)</p>
<p>Edit2:<br />
Ich Dummkopf.<br />
Natürlich gehen die Vergleiche, allerdings werden nur die Zeigeradressen verglichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480867</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480867</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:25:25 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:24:39 GMT]]></title><description><![CDATA[<p>Hm es kommt zwar kein Fehler mehr, aber sortiert ist die liste anscheind nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480872</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480872</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:24:39 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:25:49 GMT]]></title><description><![CDATA[<p>Schau mal bitte, was ich bei &quot;Edit2&quot; geschrieben habe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480874</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480874</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:25:49 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:30:36 GMT]]></title><description><![CDATA[<p>EDIT: zu spät</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480877</guid><dc:creator><![CDATA[lagalopex]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:30:36 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:40:37 GMT]]></title><description><![CDATA[<p>Ich möchte aber die Werte und nicht die Adressen vergleichen lassen.</p>
<p>PS: Bzw. wie soll ich lexicographical_compare benutzen ein einziges Array zu sortieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480883</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480883</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:40:37 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:40:52 GMT]]></title><description><![CDATA[<p>Dann nutze wie schon geschrieben <a href="http://www.cppreference.com/cppalgorithm/lexicographical_compare.html" rel="nofollow">lexicographical_compare()</a> aus &lt;algorithm&gt; an. Oder bastel dir eine eigene schleife und geh die Buchstaben durch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480886</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:40:52 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:48:17 GMT]]></title><description><![CDATA[<p>Am einfachsten wird wohl fürs erste strcmp sein. Die lexicographical_compare Variante könnte aber schneller sein, wenn man die Länge der Strings wüsste.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/23776">@TObi</a>:<br />
Du sollst es nicht zum sortieren benutzen, sondern zum vergleichen. Mit strcmp oder lexicographical_compare kannst Du die Inhalte zweier (strcmp: nullterminierten) char-Arrays vergleichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480890</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:48:17 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:51:01 GMT]]></title><description><![CDATA[<p>Es ärgert mich aber irgendwie, denn ich bin mir sicher das ich das schon einmal mit dem überladen des '&lt;' operators gemacht habe, versteh wirklich net wieso das jetzt son problem ist für mein compilier ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480892</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480892</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:51:01 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 18:53:40 GMT]]></title><description><![CDATA[<p>Der Compiler macht genau das was er soll. Nur du sagst ihm, dass er was anderes machen soll als du möchtest <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1480894</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480894</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Wed, 26 Mar 2008 18:53:40 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 19:00:58 GMT]]></title><description><![CDATA[<p>Wieso sag ich ihm was anderes?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480902</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480902</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 19:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 19:17:49 GMT]]></title><description><![CDATA[<p>T0bi schrieb:</p>
<blockquote>
<p>Es ärgert mich aber irgendwie, denn ich bin mir sicher das ich das schon einmal mit dem überladen des '&lt;' operators gemacht habe, versteh wirklich net wieso das jetzt son problem ist für mein compilier ...</p>
</blockquote>
<p>Es geht doch garnicht um den operator&lt;, sondern um das, was darin passiert. Wenn die Operator-Funktion (konstante) Referenzen annimmt, funktioniert das ganze einwandfrei. Das Problem ist: <strong>Im</strong> operator&lt; sagst Du ihm, dass er zwei Zeiger vergleichen soll. Das willst Du aber nicht, sondern Du willst die Inhalte vergleichen. Das macht man mit strcmp oder lexidings_compare. <strong>Im</strong> ansonsten vollkommen korrekten operator&lt;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480919</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480919</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Wed, 26 Mar 2008 19:17:49 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 19:21:49 GMT]]></title><description><![CDATA[<p>also quasie so:</p>
<pre><code class="language-cpp">bool operator &lt;( const LISTE &amp;newItem ) const {

     return( lexicographical_compare( ... );
}
</code></pre>
<p>???</p>
<p>Aber wie muss ich das dann in der lexicographical_compare schreiben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480923</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480923</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 19:21:49 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 19:25:11 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">bool operator &lt;( const LISTE &amp;newItem ) const {

		return( lexicographical_compare( this-&gt;szFullName, this-&gt;szFullName + strlen( this-&gt;szFullName ),
								         newItem.szFullName, newItem.szFullName + strlen( newItem.szFullName ) ) );
	}
</code></pre>
<p>olala.. es geht xD Danke.<br />
Kann mich trotzdem nicht daran erinnern das ich das damals auch so gemacht habe.<br />
Trotzdem dake.</p>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480931</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480931</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 26 Mar 2008 19:25:11 GMT</pubDate></item><item><title><![CDATA[Reply to for( iter = vList.begin( ); iter != vList.end( ); iter++ ), geht nicht? Wieso? on Wed, 26 Mar 2008 20:22:26 GMT]]></title><description><![CDATA[<p>Wahrscheinlich hast du damals std::string benutzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480984</guid><dc:creator><![CDATA[Don06]]></dc:creator><pubDate>Wed, 26 Mar 2008 20:22:26 GMT</pubDate></item></channel></rss>