<?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[Array vergleichen und identische Einträge filtern]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich bin sowohl neu hier als auch der Umgang mit Array ist für mich relativ neu.</p>
<p>Folgendes Problem:<br />
Ich muss aus zwei Arrays (array1[] und array2[]) jedes Element von array1[] mit jedem Element aus array2[] verlgeichen und dann sollte ich die identischen Werte ausgeben.</p>
<p>Soweit so gut.</p>
<p>Ich denke des funktioniert mit zwei for Schleifen (welche die Einträge durchgehen) und einer if Abfrage (für den Vergleich), bekomm den Code aber einfach nicht hin.</p>
<p>Hoffentlich kann mir jemand einen Denkanstoz geben.</p>
<p>Bin für jeden Input dankbar.</p>
<p>Guten Nacht!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/136421/array-vergleichen-und-identische-einträge-filtern</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 17:04:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/136421.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Feb 2006 22:06:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Array vergleichen und identische Einträge filtern on Thu, 09 Feb 2006 22:06:59 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich bin sowohl neu hier als auch der Umgang mit Array ist für mich relativ neu.</p>
<p>Folgendes Problem:<br />
Ich muss aus zwei Arrays (array1[] und array2[]) jedes Element von array1[] mit jedem Element aus array2[] verlgeichen und dann sollte ich die identischen Werte ausgeben.</p>
<p>Soweit so gut.</p>
<p>Ich denke des funktioniert mit zwei for Schleifen (welche die Einträge durchgehen) und einer if Abfrage (für den Vergleich), bekomm den Code aber einfach nicht hin.</p>
<p>Hoffentlich kann mir jemand einen Denkanstoz geben.</p>
<p>Bin für jeden Input dankbar.</p>
<p>Guten Nacht!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/990546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/990546</guid><dc:creator><![CDATA[kleiniris]]></dc:creator><pubDate>Thu, 09 Feb 2006 22:06:59 GMT</pubDate></item><item><title><![CDATA[Reply to Array vergleichen und identische Einträge filtern on Thu, 09 Feb 2006 22:10:59 GMT]]></title><description><![CDATA[<p>du hast die lösung schon geschrieben. wenn es an der syntax hackt, dann schau dir am besten das nächstbeste tutorial an, das google ausspuckt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/990549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/990549</guid><dc:creator><![CDATA[cin]]></dc:creator><pubDate>Thu, 09 Feb 2006 22:10:59 GMT</pubDate></item><item><title><![CDATA[Reply to Array vergleichen und identische Einträge filtern on Thu, 09 Feb 2006 22:23:42 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>ja, google hab ich schon durchsucht-aber nichts gefunden. (Durch google bin ich auch zu Euch gestoßen)</p>
<p>Nochmal zu meinen Problem: I hab echt a Problem mit der Syntax - ich bekomm des einfach nicht hin.</p>
<p>Vielleicht erbarmmt sich jemand und hilft mir.</p>
<p>Schöne Grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/post/990550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/990550</guid><dc:creator><![CDATA[kleiniris]]></dc:creator><pubDate>Thu, 09 Feb 2006 22:23:42 GMT</pubDate></item><item><title><![CDATA[Reply to Array vergleichen und identische Einträge filtern on Thu, 09 Feb 2006 23:05:12 GMT]]></title><description><![CDATA[<p>kleiniris schrieb:</p>
<blockquote>
<p>Vielleicht erbarmmt sich jemand und hilft mir.</p>
</blockquote>
<p>Erbarm:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

int main()
{
    using namespace std;

    int array1[] = { 8, 1, 5, 25, 7, 12 };
    int* array1End = array1 + sizeof( array1 )/sizeof( *array1 );

    int array2[] = { 3, 8, 42, 2, -2, 9, 12, 19, -34 };
    int* array2End = array2 + sizeof( array2 )/sizeof( *array2 );

    for( int* i = array1; i != array1End; ++i )
    {
        for( int* j = array2; j != array2End; ++j )
        {
            if( *j == *i )
            {
                cout &lt;&lt; &quot;Die Zahl &quot; &lt;&lt; *i &lt;&lt; &quot; kommt in beiden Arrays vor &quot; &lt;&lt; endl;
            }
        }
    }
    return 0;
}
</code></pre>
<p>Gruß<br />
Werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/990561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/990561</guid><dc:creator><![CDATA[Werner Salomon]]></dc:creator><pubDate>Thu, 09 Feb 2006 23:05:12 GMT</pubDate></item><item><title><![CDATA[Reply to Array vergleichen und identische Einträge filtern on Thu, 16 Feb 2006 12:08:33 GMT]]></title><description><![CDATA[<p>Hallo Werner,</p>
<p>danke!!!Du warst eine große Hilfe!!!</p>
<p>Lg,<br />
kleiniris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/995658</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/995658</guid><dc:creator><![CDATA[kleiniris]]></dc:creator><pubDate>Thu, 16 Feb 2006 12:08:33 GMT</pubDate></item></channel></rss>