<?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[calculator]]></title><description><![CDATA[<p>Hallo ich versuche gerade ein Taschenrechner zu programmieren, aber hänge schon an den Funktionen. Hier mein Code:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 
#include &lt;cstdlib&gt;

int main() {
    char cmenue = 0;

    do {

        long double ldA = 0;
        long double ldB = 0;
        long double ldRest = 0;

        system(&quot;clr&quot;);
        std::cout &lt;&lt; &quot;##################&quot;
            	  &lt;&lt; &quot;# Taschenrechner #&quot;
                  &lt;&lt; &quot;##################\n\n&quot;;
        std::cout &lt;&lt; &quot;1) Addition\n&quot;
                  &lt;&lt; &quot;2) Subtration\n&quot;
                  &lt;&lt; &quot;3) Multiplikation\n&quot;
                  &lt;&lt; &quot;4) Division\n&quot;
                  &lt;&lt; &quot;5) Programm beenden\n&quot;
                  &lt;&lt; &quot;\nIhre Eingabe: &quot;;
        std::cin &gt;&gt; cmenue;

        if(!cmenue){
            system(&quot;clr&quot;);
            std::cout &lt;&lt; &quot;######################&quot;
                      &lt;&lt; &quot;# Ungueltige Eingabe #&quot;
                      &lt;&lt; &quot;######################&quot;;
            continue;
        }
        else {
            switch(cmenue) {
                case 1 :
                system(&quot;clr&quot;);
                std::cout &lt;&lt; &quot;############&quot;
                          &lt;&lt; &quot;# Addition #&quot;
                          &lt;&lt; &quot;############&quot;;
                ldA = 0;
                ldB = 0;
                ldRest = 0;
                std::cout &lt;&lt; &quot;Gebens sie eine Zahl ein: &quot;;
                std::cin &gt;&gt; ldA;
                std::cout &lt;&lt; &quot;Geben sie eine zweite Zahl ein: &quot;;
                std::cin &gt;&gt; ldB;
                addition(ldA,ldB);
                continue;
       	    }
        }

    } while(cmenue == 5);

    std::cout &lt;&lt; &quot;Programm wir beendet\n\n&quot;
              &lt;&lt; &quot;  Druecken sie eine beliebige Taste um das Programm zu beenden: &quot;;
    std::cin.get();
}

int addition(long la, long lb) {
    system(&quot;clr&quot;);

    std::cout &lt;&lt; &quot;############&quot;
              &lt;&lt; &quot;# Addition #&quot;
              &lt;&lt; &quot;############&quot;;
    std::cout &lt;&lt; &quot;\nDas Ergebnis aus &quot; &lt;&lt; la &lt;&lt; &quot; + &quot; &lt;&lt; lb &quot; = &quot; &lt;&lt; la + lb;
    return (0);
}
</code></pre>
<p>Als Fehlermeldung kommt:<br />
'addition' wurde in diesem Gültigkeitsbereich nicht deklariert (Zeile 46)<br />
erwartet ';' vor String-Konstante (Zeile 65)</p>
<p>Die Fehlermeldungen sind mir klar aber ich habe doch z.B.: das ; in Zeile 65 gesetzt ?</p>
<p>Könnt ihr mir bitte helfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/308256/calculator</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 23:24:39 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/308256.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Sep 2012 13:34:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to calculator on Wed, 19 Sep 2012 13:34:33 GMT]]></title><description><![CDATA[<p>Hallo ich versuche gerade ein Taschenrechner zu programmieren, aber hänge schon an den Funktionen. Hier mein Code:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 
#include &lt;cstdlib&gt;

int main() {
    char cmenue = 0;

    do {

        long double ldA = 0;
        long double ldB = 0;
        long double ldRest = 0;

        system(&quot;clr&quot;);
        std::cout &lt;&lt; &quot;##################&quot;
            	  &lt;&lt; &quot;# Taschenrechner #&quot;
                  &lt;&lt; &quot;##################\n\n&quot;;
        std::cout &lt;&lt; &quot;1) Addition\n&quot;
                  &lt;&lt; &quot;2) Subtration\n&quot;
                  &lt;&lt; &quot;3) Multiplikation\n&quot;
                  &lt;&lt; &quot;4) Division\n&quot;
                  &lt;&lt; &quot;5) Programm beenden\n&quot;
                  &lt;&lt; &quot;\nIhre Eingabe: &quot;;
        std::cin &gt;&gt; cmenue;

        if(!cmenue){
            system(&quot;clr&quot;);
            std::cout &lt;&lt; &quot;######################&quot;
                      &lt;&lt; &quot;# Ungueltige Eingabe #&quot;
                      &lt;&lt; &quot;######################&quot;;
            continue;
        }
        else {
            switch(cmenue) {
                case 1 :
                system(&quot;clr&quot;);
                std::cout &lt;&lt; &quot;############&quot;
                          &lt;&lt; &quot;# Addition #&quot;
                          &lt;&lt; &quot;############&quot;;
                ldA = 0;
                ldB = 0;
                ldRest = 0;
                std::cout &lt;&lt; &quot;Gebens sie eine Zahl ein: &quot;;
                std::cin &gt;&gt; ldA;
                std::cout &lt;&lt; &quot;Geben sie eine zweite Zahl ein: &quot;;
                std::cin &gt;&gt; ldB;
                addition(ldA,ldB);
                continue;
       	    }
        }

    } while(cmenue == 5);

    std::cout &lt;&lt; &quot;Programm wir beendet\n\n&quot;
              &lt;&lt; &quot;  Druecken sie eine beliebige Taste um das Programm zu beenden: &quot;;
    std::cin.get();
}

int addition(long la, long lb) {
    system(&quot;clr&quot;);

    std::cout &lt;&lt; &quot;############&quot;
              &lt;&lt; &quot;# Addition #&quot;
              &lt;&lt; &quot;############&quot;;
    std::cout &lt;&lt; &quot;\nDas Ergebnis aus &quot; &lt;&lt; la &lt;&lt; &quot; + &quot; &lt;&lt; lb &quot; = &quot; &lt;&lt; la + lb;
    return (0);
}
</code></pre>
<p>Als Fehlermeldung kommt:<br />
'addition' wurde in diesem Gültigkeitsbereich nicht deklariert (Zeile 46)<br />
erwartet ';' vor String-Konstante (Zeile 65)</p>
<p>Die Fehlermeldungen sind mir klar aber ich habe doch z.B.: das ; in Zeile 65 gesetzt ?</p>
<p>Könnt ihr mir bitte helfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2252678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2252678</guid><dc:creator><![CDATA[repac3r]]></dc:creator><pubDate>Wed, 19 Sep 2012 13:34:33 GMT</pubDate></item><item><title><![CDATA[Reply to calculator on Wed, 19 Sep 2012 13:38:20 GMT]]></title><description><![CDATA[<p>Fehler 1:<br />
Entweder Du definierst die Funktion addition vor der main - Funktion, oder aber Du schreibst vor der main - Funktion eine entsprechende Deklaration.</p>
<p>Fehler 2:<br />
Da fehlt einmal &lt;&lt; zwischen zwei auszugebenden Ausdrücken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2252681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2252681</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 19 Sep 2012 13:38:20 GMT</pubDate></item><item><title><![CDATA[Reply to calculator on Wed, 19 Sep 2012 13:42:01 GMT]]></title><description><![CDATA[<p>Belli schrieb:</p>
<blockquote>
<p>Fehler 1:<br />
Entweder Du definierst die Funktion addition vor der main - Funktion, oder aber Du schreibst vor der main - Funktion eine entsprechende Deklaration.</p>
<p>Fehler 2:<br />
Da fehlt einmal &lt;&lt; zwischen zwei auszugebenden Ausdrücken.</p>
</blockquote>
<p>ok danke Fehler gefunden <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/2252683</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2252683</guid><dc:creator><![CDATA[repac3r]]></dc:creator><pubDate>Wed, 19 Sep 2012 13:42:01 GMT</pubDate></item></channel></rss>