<?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[Schleife]]></title><description><![CDATA[<p>Hallo,<br />
ich bin ein blutiger Anfänger und lerne erst seit paar Wochen C++.<br />
Ich benutze das Tut : <a href="http://tutorial.schornboeck.net/" rel="nofollow">http://tutorial.schornboeck.net/</a><br />
Nun hab ich mich an einen simplen Taschenrechner gewackt und mein Compiler (Dev-C++) meldet immer einen fehler...</p>
<p>Hier der Code:</p>
<pre><code class="language-cpp">#include&lt;iostream&gt;
using namespace std;

int main()
{
    int a;
    double b;
    double c;

    cout&lt;&lt;&quot;Bitte wähle einen Modus\n&quot;;
    cout&lt;&lt;&quot;(1) Addition, (2) Subtraktion, (3) Multiplikation, (4) Division\n&quot;;
    cin&gt;&gt;a

    switch(a)
    {
    case 1:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a+b&lt;&lt;&quot;\n&quot;;
           break;

           case 2:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a-b&lt;&lt;&quot;\n&quot;;
           break;

           case 3:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a*b&lt;&lt;&quot;\n&quot;;
           break;

           case 4:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a/b&lt;&lt;&quot;\n&quot;;
           break;

           default:
                   cout&lt;&lt;&quot;Deine Eingabe war fehlerhaft, bitte versuche es erneuert\n&quot;;
           }

}
</code></pre>
<p>Ich finde den Fehler einfach nicht, hoffe ihr könnt mir helfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/201865/schleife</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 06:54:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/201865.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 05 Jan 2008 01:57:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Schleife on Sat, 05 Jan 2008 02:01:38 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich bin ein blutiger Anfänger und lerne erst seit paar Wochen C++.<br />
Ich benutze das Tut : <a href="http://tutorial.schornboeck.net/" rel="nofollow">http://tutorial.schornboeck.net/</a><br />
Nun hab ich mich an einen simplen Taschenrechner gewackt und mein Compiler (Dev-C++) meldet immer einen fehler...</p>
<p>Hier der Code:</p>
<pre><code class="language-cpp">#include&lt;iostream&gt;
using namespace std;

int main()
{
    int a;
    double b;
    double c;

    cout&lt;&lt;&quot;Bitte wähle einen Modus\n&quot;;
    cout&lt;&lt;&quot;(1) Addition, (2) Subtraktion, (3) Multiplikation, (4) Division\n&quot;;
    cin&gt;&gt;a

    switch(a)
    {
    case 1:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a+b&lt;&lt;&quot;\n&quot;;
           break;

           case 2:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a-b&lt;&lt;&quot;\n&quot;;
           break;

           case 3:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a*b&lt;&lt;&quot;\n&quot;;
           break;

           case 4:
                 cout&lt;&lt;&quot;Bitte gebe eine Zahl ein\n&quot;;
                 cin&gt;&gt;a;
                 cout&lt;&lt;&quot;Bitte gebe die zweite Zahl ein\n&quot;;
                 cin&gt;&gt;b;
                 cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;a/b&lt;&lt;&quot;\n&quot;;
           break;

           default:
                   cout&lt;&lt;&quot;Deine Eingabe war fehlerhaft, bitte versuche es erneuert\n&quot;;
           }

}
</code></pre>
<p>Ich finde den Fehler einfach nicht, hoffe ihr könnt mir helfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1430901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1430901</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 05 Jan 2008 02:01:38 GMT</pubDate></item><item><title><![CDATA[Reply to Schleife on Sat, 05 Jan 2008 02:07:00 GMT]]></title><description><![CDATA[<p>Die Fehlermeldungen des Compilers beachten! Sie sollten eigentlich die Informationen enthalten, die dir weiterhelfen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>In dem geposteten Quelltext fehlt in Zeile 11 ein Semikolon und ganz am Ende des Programms eine schließende geschweifte Klammer.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1430908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1430908</guid><dc:creator><![CDATA[na ja]]></dc:creator><pubDate>Sat, 05 Jan 2008 02:07:00 GMT</pubDate></item><item><title><![CDATA[Reply to Schleife on Sat, 05 Jan 2008 02:08:35 GMT]]></title><description><![CDATA[<p>Meine natürlich Zeile 12!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1430909</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1430909</guid><dc:creator><![CDATA[na ja]]></dc:creator><pubDate>Sat, 05 Jan 2008 02:08:35 GMT</pubDate></item><item><title><![CDATA[Reply to Schleife on Sat, 05 Jan 2008 02:13:36 GMT]]></title><description><![CDATA[<p>Eigentlich fehlt nur das Semikolon. Kam mir vorhin anders vor. Geposteten Quelltext nochmal geändert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1430912</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1430912</guid><dc:creator><![CDATA[na ja]]></dc:creator><pubDate>Sat, 05 Jan 2008 02:13:36 GMT</pubDate></item><item><title><![CDATA[Reply to Schleife on Sat, 05 Jan 2008 02:28:14 GMT]]></title><description><![CDATA[<p>Ja habs geändert geht aber irgendwie nicht.-<br />
Er sagt das switch (a) sei falsch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1430919</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1430919</guid><dc:creator><![CDATA[nedem_a]]></dc:creator><pubDate>Sat, 05 Jan 2008 02:28:14 GMT</pubDate></item><item><title><![CDATA[Reply to Schleife on Sat, 05 Jan 2008 02:29:28 GMT]]></title><description><![CDATA[<p>hatte noch ein ; vergessen habs geändert und es geht danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1430921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1430921</guid><dc:creator><![CDATA[nedem_b]]></dc:creator><pubDate>Sat, 05 Jan 2008 02:29:28 GMT</pubDate></item></channel></rss>