<?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[ELSE]]></title><description><![CDATA[<p>Ich habe ein Problem.<br />
Wenn man in meine &quot;mini suchmaschine&quot; etwas anderes eingibt, sollte es das anzeigen, was ich bei -&gt; else.. &lt;- geschrieben habe.</p>
<p>Mein Problem: Wenn ich z.B ascii eingebe, was natürlich richtig ist, zeigt mein Programm, das an, was ich bei ascii geschrieben habe und das was ich bei else geschrieben habe.</p>
<p>Wie kann ich mein Problem beseitigen??</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;

using namespace std;

int main()
{

     string Begriff;

     for (int i=0; i &lt; 100; i++)  

     {
     cout &lt;&lt; &quot;\n\nBegriff eingeben&quot; ;
     cin &gt;&gt; Begriff;

    if (Begriff == &quot;ascii&quot;)
     {
       cout &lt;&lt; &quot;Der Ascii Zeichensatz ist eine amerikanische Norm bla bla....&quot;;
     } 

     if (Begriff == &quot;baby&quot;)
     {
       cout &lt;&lt; &quot;Babys sind klein :P &quot; ;
     }   

     else
     {
      cout &lt;&lt; &quot; \n\nEs wurden keine mit Ihrer Suchanfrage - &quot; &lt;&lt; Begriff &lt;&lt; &quot; - uebereinstimmenden Woerter gefunden. &quot; ;                                 
      cout &lt;&lt; &quot; \nDas sollten Sie beachten: &quot; ; 
      cout &lt;&lt; &quot; \n* Vergewissern Sie sich, dass alle Wörter richtig und klein geschrieben sind! &quot; ;
      cout &lt;&lt; &quot; \n* Probieren Sie nur C++ Wörter! &quot; ;
      cout &lt;&lt; &quot; \n* Verwenden Sie keine Leerzeilen! &quot; ;
     }

} 

    return0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/251777/else</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 06:10:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/251777.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Oct 2009 11:26:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ELSE on Sat, 10 Oct 2009 11:26:07 GMT]]></title><description><![CDATA[<p>Ich habe ein Problem.<br />
Wenn man in meine &quot;mini suchmaschine&quot; etwas anderes eingibt, sollte es das anzeigen, was ich bei -&gt; else.. &lt;- geschrieben habe.</p>
<p>Mein Problem: Wenn ich z.B ascii eingebe, was natürlich richtig ist, zeigt mein Programm, das an, was ich bei ascii geschrieben habe und das was ich bei else geschrieben habe.</p>
<p>Wie kann ich mein Problem beseitigen??</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;

using namespace std;

int main()
{

     string Begriff;

     for (int i=0; i &lt; 100; i++)  

     {
     cout &lt;&lt; &quot;\n\nBegriff eingeben&quot; ;
     cin &gt;&gt; Begriff;

    if (Begriff == &quot;ascii&quot;)
     {
       cout &lt;&lt; &quot;Der Ascii Zeichensatz ist eine amerikanische Norm bla bla....&quot;;
     } 

     if (Begriff == &quot;baby&quot;)
     {
       cout &lt;&lt; &quot;Babys sind klein :P &quot; ;
     }   

     else
     {
      cout &lt;&lt; &quot; \n\nEs wurden keine mit Ihrer Suchanfrage - &quot; &lt;&lt; Begriff &lt;&lt; &quot; - uebereinstimmenden Woerter gefunden. &quot; ;                                 
      cout &lt;&lt; &quot; \nDas sollten Sie beachten: &quot; ; 
      cout &lt;&lt; &quot; \n* Vergewissern Sie sich, dass alle Wörter richtig und klein geschrieben sind! &quot; ;
      cout &lt;&lt; &quot; \n* Probieren Sie nur C++ Wörter! &quot; ;
      cout &lt;&lt; &quot; \n* Verwenden Sie keine Leerzeilen! &quot; ;
     }

} 

    return0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1790491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1790491</guid><dc:creator><![CDATA[C++ Gangsta _P]]></dc:creator><pubDate>Sat, 10 Oct 2009 11:26:07 GMT</pubDate></item><item><title><![CDATA[Reply to ELSE on Sat, 10 Oct 2009 11:32:24 GMT]]></title><description><![CDATA[<p>Du mußt &quot;else if&quot; verwenden, ansonsten bezieht sich das &quot;else&quot; nur auf das letzte &quot;if&quot;, daher:</p>
<pre><code class="language-cpp">if(...)
{
}
else if(...)
{
}
else if(...)
{
}
else
{
  ...
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1790493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1790493</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Sat, 10 Oct 2009 11:32:24 GMT</pubDate></item><item><title><![CDATA[Reply to ELSE on Sat, 10 Oct 2009 15:15:01 GMT]]></title><description><![CDATA[<p>dein problem kann man auch eleganter lösen:</p>
<pre><code class="language-cpp">#include &lt;map&gt;
#include &lt;string&gt;

#include &lt;iostream&gt;

int main()
{
 std::map&lt;std::string, std::string&gt; my_map;
 my_map[&quot;baby&quot;] = &quot;klein usw. :P&quot;;
//...

 for(std::string eingabe; std::cin &gt;&gt; eingabe; )
 {
   if(eingabe == &quot;stop&quot;)
     break;
   const_iterator found = my_map.find(eingabe);
   if(found == my_map.end())
   {
     std::cout &lt;&lt; &quot;gibts nicht&quot; &lt;&lt; std::endl;
   }
 }

}
</code></pre>
<p>bb</p>
<p>PS: na zum glück ging das mit dem eingeloggt sein jz so lang gut -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1790619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1790619</guid><dc:creator><![CDATA[unskilled @logged-off]]></dc:creator><pubDate>Sat, 10 Oct 2009 15:15:01 GMT</pubDate></item></channel></rss>