<?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[Passwort Programm Problem]]></title><description><![CDATA[<p>Ich arbeite noch nicht sehr lange mit c++ und wollte jetzt ein einfaches programm schreiben der bei der eingabe von &quot;abc123&quot; &quot;richtiges passwort&quot; angiebt und bei einer anderen eingabe halt &quot;falsches passwort&quot; angiebt.<br />
Nur habe ich dsa Problem das er irgendwie immer das ein &quot;falsches Passwort&quot; ausgiebt.</p>
<pre><code class="language-csharp">#include &lt;iostream&gt;
using namespace std;

int main ()
{
    cout &lt;&lt; &quot;Passwort: &quot;;
    char zeichen[256];
    cin.getline(zeichen,256);

    if (zeichen==&quot;abc123&quot;)
                    {
                    cout&lt;&lt; &quot;Richtiges Passwort\n&quot;;
                    }
    if (zeichen!=&quot;abc123&quot;)
                    {
                    cout &lt;&lt; &quot;Falsches Passwort\n&quot;;
                    }
    cin.get();
}
</code></pre>
<p>hoffe ihr könnt mir helfen</p>
<p>mfg<br />
leumi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/200476/passwort-programm-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 04 Oct 2026 20:46:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/200476.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Dec 2007 15:02:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Passwort Programm Problem on Sat, 15 Dec 2007 15:02:07 GMT]]></title><description><![CDATA[<p>Ich arbeite noch nicht sehr lange mit c++ und wollte jetzt ein einfaches programm schreiben der bei der eingabe von &quot;abc123&quot; &quot;richtiges passwort&quot; angiebt und bei einer anderen eingabe halt &quot;falsches passwort&quot; angiebt.<br />
Nur habe ich dsa Problem das er irgendwie immer das ein &quot;falsches Passwort&quot; ausgiebt.</p>
<pre><code class="language-csharp">#include &lt;iostream&gt;
using namespace std;

int main ()
{
    cout &lt;&lt; &quot;Passwort: &quot;;
    char zeichen[256];
    cin.getline(zeichen,256);

    if (zeichen==&quot;abc123&quot;)
                    {
                    cout&lt;&lt; &quot;Richtiges Passwort\n&quot;;
                    }
    if (zeichen!=&quot;abc123&quot;)
                    {
                    cout &lt;&lt; &quot;Falsches Passwort\n&quot;;
                    }
    cin.get();
}
</code></pre>
<p>hoffe ihr könnt mir helfen</p>
<p>mfg<br />
leumi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1420986</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1420986</guid><dc:creator><![CDATA[leumi]]></dc:creator><pubDate>Sat, 15 Dec 2007 15:02:07 GMT</pubDate></item><item><title><![CDATA[Reply to Passwort Programm Problem on Sat, 15 Dec 2007 15:03:39 GMT]]></title><description><![CDATA[<p>Verwende std::string dann funktioniert das. Ansonsten musst du strcmp verwenden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1420987</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1420987</guid><dc:creator><![CDATA[Gator]]></dc:creator><pubDate>Sat, 15 Dec 2007 15:03:39 GMT</pubDate></item><item><title><![CDATA[Reply to Passwort Programm Problem on Sat, 15 Dec 2007 15:07:14 GMT]]></title><description><![CDATA[<p>char-arrays kannst du nämlich nicht mit &quot;==&quot; verwenden...</p>
<p>entweder:</p>
<pre><code class="language-cpp">if (strcmp(eingabe, &quot;abc&quot;)==0)
</code></pre>
<p>oder:</p>
<pre><code class="language-cpp">#include &lt;string&gt;
[...]
std::string eingabe;
std::cin &gt;&gt; eingabe;
if (eingabe==&quot;abc&quot;)
{
[...]
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1420989</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1420989</guid><dc:creator><![CDATA[langeweile]]></dc:creator><pubDate>Sat, 15 Dec 2007 15:07:14 GMT</pubDate></item><item><title><![CDATA[Reply to Passwort Programm Problem on Sat, 15 Dec 2007 15:11:00 GMT]]></title><description><![CDATA[<p>Ok danke für die schnelle antwort!</p>
<p>jetzt funktionierts!</p>
<p>leumi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1420992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1420992</guid><dc:creator><![CDATA[leumi]]></dc:creator><pubDate>Sat, 15 Dec 2007 15:11:00 GMT</pubDate></item></channel></rss>