<?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[Irgendwas stimmt hier nicht!]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe ein Passwort-eingabe-programm (^^) prgrammiert.<br />
Aber es zeigt mir immer an das ich das pw falsch eingegeben habe, obwohl ich es richtig eingebe!<br />
Hier der Code:</p>
<pre><code>#include &lt;iostream&gt;

int main()
{
    char Text[99] = &quot;hallo&quot;; 
    int leer;
    char Pw[99];
    std::cout&lt;&lt;&quot;Geben sie bitte das Passwort ein: &quot;;
    std::cin&gt;&gt;Pw;
    if (Pw == Text)
    {
           std::cout&lt;&lt;&quot;Juhu geschafft&quot;;
           std::cin&gt;&gt;leer;
    }
    if (Pw != Text)
    {
           std::cout&lt;&lt;&quot;Falsch!&quot;;
           std::cin&gt;&gt;leer;
    }
}
</code></pre>
<p>Vielen Dank schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/118048/irgendwas-stimmt-hier-nicht</link><generator>RSS for Node</generator><lastBuildDate>Fri, 21 Aug 2026 06:22:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/118048.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 14 Aug 2005 13:35:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Irgendwas stimmt hier nicht! on Sun, 14 Aug 2005 13:35:05 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe ein Passwort-eingabe-programm (^^) prgrammiert.<br />
Aber es zeigt mir immer an das ich das pw falsch eingegeben habe, obwohl ich es richtig eingebe!<br />
Hier der Code:</p>
<pre><code>#include &lt;iostream&gt;

int main()
{
    char Text[99] = &quot;hallo&quot;; 
    int leer;
    char Pw[99];
    std::cout&lt;&lt;&quot;Geben sie bitte das Passwort ein: &quot;;
    std::cin&gt;&gt;Pw;
    if (Pw == Text)
    {
           std::cout&lt;&lt;&quot;Juhu geschafft&quot;;
           std::cin&gt;&gt;leer;
    }
    if (Pw != Text)
    {
           std::cout&lt;&lt;&quot;Falsch!&quot;;
           std::cin&gt;&gt;leer;
    }
}
</code></pre>
<p>Vielen Dank schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/851968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/851968</guid><dc:creator><![CDATA[Halöle]]></dc:creator><pubDate>Sun, 14 Aug 2005 13:35:05 GMT</pubDate></item><item><title><![CDATA[Reply to Irgendwas stimmt hier nicht! on Sun, 14 Aug 2005 13:44:28 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">if (Pw == Text)
</code></pre>
<p>Vergleicht pointer nicht strings.<br />
besser</p>
<pre><code class="language-cpp">if ( strcmp(Pw,Text) == 0 )
</code></pre>
<p>Kurt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/851975</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/851975</guid><dc:creator><![CDATA[ZuK]]></dc:creator><pubDate>Sun, 14 Aug 2005 13:44:28 GMT</pubDate></item><item><title><![CDATA[Reply to Irgendwas stimmt hier nicht! on Sun, 14 Aug 2005 13:48:02 GMT]]></title><description><![CDATA[<p>Ahh vielen dank!!!<br />
Hat super geklappt!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/851979</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/851979</guid><dc:creator><![CDATA[halöle]]></dc:creator><pubDate>Sun, 14 Aug 2005 13:48:02 GMT</pubDate></item><item><title><![CDATA[Reply to Irgendwas stimmt hier nicht! on Sun, 14 Aug 2005 15:20:22 GMT]]></title><description><![CDATA[<p>Kleiner Tipp:</p>
<p>Du kannst unter deine #include-Anweisungen &quot;using namespace std;&quot; packen, dann musste nicht immer das std:: vor cout bzw. cin schreiben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/852019</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852019</guid><dc:creator><![CDATA[The_Saint]]></dc:creator><pubDate>Sun, 14 Aug 2005 15:20:22 GMT</pubDate></item><item><title><![CDATA[Reply to Irgendwas stimmt hier nicht! on Mon, 15 Aug 2005 14:04:53 GMT]]></title><description><![CDATA[<p>Das würde denn so aussehen:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main()
{
    char Text[99] = &quot;hallo&quot;;
    int leer;
    char Pw[99];
    cout&lt;&lt;&quot;Geben sie bitte das Passwort ein: &quot;;
    cin&gt;&gt;Pw;
    if ( strcmp(Pw,Text) == 0 )
    {
           cout&lt;&lt;&quot;Juhu geschafft&quot;;
           cin&gt;&gt;leer;
    }
    if (Pw != Text)
    {
           cout&lt;&lt;&quot;Falsch!&quot;;
           cin&gt;&gt;leer;
    }
}
</code></pre>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/852181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852181</guid><dc:creator><![CDATA[Powerplayer]]></dc:creator><pubDate>Mon, 15 Aug 2005 14:04:53 GMT</pubDate></item><item><title><![CDATA[Reply to Irgendwas stimmt hier nicht! on Sun, 14 Aug 2005 21:23:02 GMT]]></title><description><![CDATA[<p>ma sollte den fehler vielleicht aus dem beispiel mal entfernen, auch wenn man was anderes demonstrieren will...</p>
<p>.MamboKurt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/852254</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852254</guid><dc:creator><![CDATA[MamboKurt]]></dc:creator><pubDate>Sun, 14 Aug 2005 21:23:02 GMT</pubDate></item></channel></rss>