<?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[warning C4018: &#x27;&amp;lt;&#x27; : signed&#x2F;unsigned mismatch]]></title><description><![CDATA[<p>hi.</p>
<p>ich habe hier diese warnung (siehe titel) in meinem programm (ziemlich oft), für folgenden code:</p>
<pre><code class="language-cpp">for (i=0;i&lt;las.size();i++)
</code></pre>
<p>diese würde ich gerne beseitigen. ich hatte das mal so probiert:</p>
<pre><code class="language-cpp">for (i=0;i&lt;(int)las.size();i++)
</code></pre>
<p>, da wurde mir aber gesagt, ich sollte keine &quot;naked cast&quot; benutzen.</p>
<p>also wie mache ich es dann richtig?<br />
DANKE.<br />
STICK.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171854/warning-c4018-lt-signed-unsigned-mismatch</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 14:10:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171854.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 Jan 2007 02:00:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to warning C4018: &#x27;&amp;lt;&#x27; : signed&#x2F;unsigned mismatch on Tue, 30 Jan 2007 02:00:12 GMT]]></title><description><![CDATA[<p>hi.</p>
<p>ich habe hier diese warnung (siehe titel) in meinem programm (ziemlich oft), für folgenden code:</p>
<pre><code class="language-cpp">for (i=0;i&lt;las.size();i++)
</code></pre>
<p>diese würde ich gerne beseitigen. ich hatte das mal so probiert:</p>
<pre><code class="language-cpp">for (i=0;i&lt;(int)las.size();i++)
</code></pre>
<p>, da wurde mir aber gesagt, ich sollte keine &quot;naked cast&quot; benutzen.</p>
<p>also wie mache ich es dann richtig?<br />
DANKE.<br />
STICK.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219516</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219516</guid><dc:creator><![CDATA[stick_thai]]></dc:creator><pubDate>Tue, 30 Jan 2007 02:00:12 GMT</pubDate></item><item><title><![CDATA[Reply to warning C4018: &#x27;&amp;lt;&#x27; : signed&#x2F;unsigned mismatch on Tue, 30 Jan 2007 06:56:12 GMT]]></title><description><![CDATA[<p>i mit dem gleichen unsigned Type wie der Return von .size() deklarieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219527</guid><dc:creator><![CDATA[b7f7]]></dc:creator><pubDate>Tue, 30 Jan 2007 06:56:12 GMT</pubDate></item><item><title><![CDATA[Reply to warning C4018: &#x27;&amp;lt;&#x27; : signed&#x2F;unsigned mismatch on Tue, 30 Jan 2007 07:10:26 GMT]]></title><description><![CDATA[<p>Wenn 'las' ein Standard-Container (vector, set, map, string,...) ist, die geben Größenangaben als size_t heraus, also solltest du deine Zählervariablen auch als size_t definieren.</p>
<p>(die Alternativen sind einfach: die Warnung unterdrücken durch einen Cast - oder die Warnung ignorieren (der Vergleich wird erst problematisch, wenn dein Container mehr als INT_MAX Elemente hat))</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219532</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219532</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Tue, 30 Jan 2007 07:10:26 GMT</pubDate></item></channel></rss>