<?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[error C2447]]></title><description><![CDATA[<p>Hiho,</p>
<p>leider muss ich euch schon wieder um Hilfe bitten :&lt;</p>
<p>Ich versuche grade nen kleinen Taschenrechner zu schreiben, allerdings bekomme ich immer folgenden Fehler:</p>
<p>error C2447: '{': Funktionsheader fehlt - Parameterliste im alten Stil?</p>
<p>Hier mal der Code:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;
using namespace std;
int main ();
{
    int Zahl, Zahl2;Rechenart;+;-,:;*
    unsinged short int Ergebnis

	cout &lt;&lt;&quot;Geben sie die erste Zahl ein\n&quot;;
    cin &gt;&gt; Zahl;

    cout &lt;&lt;&quot;Geben sie die zweite Zahln ein \n&quot;;
    cin &gt;&gt; Zahl2;

    cout&lt;&lt;&quot;Wählen sie die Rechenart\n&quot;;
    cin &gt;&gt;Rechenart

    if (Rechenart == +)
	{
        Ergebnis = Zahl + Zahl2
			cout&lt;&lt;Ergenis&lt;&lt;endl; 
	}

    if (Rechenart == -)
	{
        Ergebnis = Zahl - Zahl2
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

    if (Rechenart == *)
	{
        Ergebnis = Zahl * Zahl2
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

    if (Rechenart == :)
	{
         Ergebis = Zahl : Zahl2
			 cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}
	else
		cout &lt;&lt;&quot; Existiert nicht&quot;;

    getch ();
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/285210/error-c2447</link><generator>RSS for Node</generator><lastBuildDate>Fri, 21 Aug 2026 11:22:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/285210.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Apr 2011 11:28:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:28:01 GMT]]></title><description><![CDATA[<p>Hiho,</p>
<p>leider muss ich euch schon wieder um Hilfe bitten :&lt;</p>
<p>Ich versuche grade nen kleinen Taschenrechner zu schreiben, allerdings bekomme ich immer folgenden Fehler:</p>
<p>error C2447: '{': Funktionsheader fehlt - Parameterliste im alten Stil?</p>
<p>Hier mal der Code:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;
using namespace std;
int main ();
{
    int Zahl, Zahl2;Rechenart;+;-,:;*
    unsinged short int Ergebnis

	cout &lt;&lt;&quot;Geben sie die erste Zahl ein\n&quot;;
    cin &gt;&gt; Zahl;

    cout &lt;&lt;&quot;Geben sie die zweite Zahln ein \n&quot;;
    cin &gt;&gt; Zahl2;

    cout&lt;&lt;&quot;Wählen sie die Rechenart\n&quot;;
    cin &gt;&gt;Rechenart

    if (Rechenart == +)
	{
        Ergebnis = Zahl + Zahl2
			cout&lt;&lt;Ergenis&lt;&lt;endl; 
	}

    if (Rechenart == -)
	{
        Ergebnis = Zahl - Zahl2
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

    if (Rechenart == *)
	{
        Ergebnis = Zahl * Zahl2
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

    if (Rechenart == :)
	{
         Ergebis = Zahl : Zahl2
			 cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}
	else
		cout &lt;&lt;&quot; Existiert nicht&quot;;

    getch ();
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2050121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050121</guid><dc:creator><![CDATA[Status]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:28:01 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 17:29:06 GMT]]></title><description><![CDATA[<p>du darfst die rechenart nicht so definieren<br />
machs besser so:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;
using namespace std;
int main ()
{
char rechenart;
int Zahl, Zahl2, Ergebnis;

cout &lt;&lt;&quot;Geben sie die erste Zahl ein\n&quot;;
    cin &gt;&gt; Zahl;

    cout &lt;&lt;&quot;Geben sie die zweite Zahln ein \n&quot;;
    cin &gt;&gt; Zahl2;

    cout&lt;&lt;&quot;Wählen sie die Rechenart\n&quot;;
    cin &gt;&gt;Rechenart

if (rechenart == '+')
{
   Ergebnis = Zahl + Zahl2;
}

if (Rechenart == '-')
{
  Ergebnis = Zahl - Zahl2
   cout&lt;&lt;Ergebnis&lt;&lt;endl;
}

if (Rechenart == '*')
{
  Ergebnis = Zahl * Zahl2
  cout&lt;&lt;Ergebnis&lt;&lt;endl; 
}

if (Rechenart == ':')
{
  Ergebis = Zahl / Zahl2; // DAs Divisionzeichen ist /
  cout&lt;&lt;Ergebnis&lt;&lt;endl; 
}
else
   cout &lt;&lt;&quot; Existiert nicht&quot;;

    getch ();
    return 0;
}
// und so weiter
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2050124</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050124</guid><dc:creator><![CDATA[Gucky]]></dc:creator><pubDate>Sat, 16 Apr 2011 17:29:06 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:42:33 GMT]]></title><description><![CDATA[<p>Gucky schrieb:</p>
<blockquote>
<p>machs besser so:</p>
<pre><code class="language-cpp">int main ();
</code></pre>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050125</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050125</guid><dc:creator><![CDATA[guckmal]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:42:33 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:43:30 GMT]]></title><description><![CDATA[<p>habe ich doch ... ?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050126</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050126</guid><dc:creator><![CDATA[Status]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:43:30 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:48:01 GMT]]></title><description><![CDATA[<p>Und - wer hat den Unterschied erkannt zwischen der Funktionsdeklaration <code>int main();</code> un einer Funktionsdefinition <code>int main() {...}</code> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050129</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:48:01 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:50:26 GMT]]></title><description><![CDATA[<p>guckmal schrieb:</p>
<blockquote>
<p>Gucky schrieb:</p>
<blockquote>
<p>machs besser so:</p>
<pre><code class="language-cpp">int main ();
</code></pre>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
</blockquote>
<p><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="😃"
    /> <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="😃"
    /> <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>
<p>@TE:<br />
Hinter der main muss dass Semikolon weg...so ist es nur eine Funktionsdeklaration aber keine Definition. Main darfst du auch gar nicht deklarieren.<br />
Was soll denn das für ein Konstrukt in Zeile 6 sein?<br />
Und in Zeile 7 fehlt auch ein Semikolon.</p>
<p>Lg freeG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050131</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:50:26 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:50:50 GMT]]></title><description><![CDATA[<p>Weiß jetzt grade nicht was ihr von mir wollte, hatte da von anfang an int main (); stehen o.ô</p>
<p>@ fr33g, kenne mich in dem Bereich noch nicht wirklich so gut aus, hab da oben also alles reingeschmissen was ich verwenden wollte :3</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050132</guid><dc:creator><![CDATA[Status]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:50:50 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:54:39 GMT]]></title><description><![CDATA[<p>Status schrieb:</p>
<blockquote>
<p>Weiß jetzt grade nicht was ihr von mir wollte, hatte da von anfang an int main (); stehen o.ô</p>
</blockquote>
<p>Ja das ist ja auch total falsch;-), es muss so sein:</p>
<pre><code class="language-cpp">int main()
{
  // code
}
</code></pre>
<p>Lg freeG</p>
<p>EDIT:</p>
<p>Also:</p>
<pre><code class="language-cpp">int main()
{
   int value 1, value2;
   std::string arithmeticOperator;
   // So nun ließt du beide Zahlen ein und deinen Rechenoperator
   // Und dann kannste mit if eben prüfen welches eingeben wurde und darauf entsprechend reagieren
)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2050136</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050136</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:54:39 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:55:29 GMT]]></title><description><![CDATA[<p>Hab ja main ()<br />
{</p>
<p>code</p>
<p>}</p>
<p>Und das &quot;;&quot; brauche ich, da ich sonst div. Fehlermeldungen kriege.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050139</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050139</guid><dc:creator><![CDATA[Status]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:55:29 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 11:57:39 GMT]]></title><description><![CDATA[<p>Status schrieb:</p>
<blockquote>
<p>Hab ja main ()<br />
{</p>
<p>code</p>
<p>}</p>
<p>Und das &quot;;&quot; brauche ich, da ich sonst div. Fehlermeldungen kriege.</p>
</blockquote>
<p>Ja vermutlich, weil dein Code voller Fehler ist;-)<br />
Versuchs mal so wie ich gepostet habe, wenn dann weiterhin Fehler auftauchen poste deinen neuen Code und wir werden dir helfen.</p>
<p>Lg freeG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050141</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050141</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Sat, 16 Apr 2011 11:57:39 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:06:22 GMT]]></title><description><![CDATA[<p>Mh, meinst also so ?</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;
using namespace std;
int main ()
{
      int Zahl, Zahl2,Ergebnis,Rechenart;
      std::string arithmeticOperator; 

	cout &lt;&lt;&quot;Geben sie die erste Zahl ein\n&quot;;
    cin &gt;&gt; Zahl;

    cout &lt;&lt;&quot;Geben sie die zweite Zahln ein \n&quot;;
    cin &gt;&gt; Zahl2;

    cout&lt;&lt;&quot;Wählen sie die Rechenart\n&quot;;
    cin &gt;&gt;Rechenart

		if (Rechenart == '+')
	{
        Ergebnis = Zahl + Zahl2
			cout&lt;&lt;Ergenis&lt;&lt;endl; 
	}

    if (Rechenart == '-')
	{
        Ergebnis = Zahl - Zahl2
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

    if (Rechenart == '*')
	{
        Ergebnis = Zahl * Zahl2
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

	if (Rechenart == ':')
	{
         Ergebis = Zahl / Zahl2
			 cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}
	else
		cout &lt;&lt;&quot; Existiert nicht&quot;;

    getch ();
    return 0;
}
</code></pre>
<p>Kriege ich folgende Fehler:</p>
<p>1&gt;Kompilieren...<br />
1&gt;Taschenrechner.cpp<br />
1&gt;c:\users\config\documents\visual studio 2008\projects\taschenrechner\taschenrechner\taschenrechner.cpp(18) : error C2143: Syntaxfehler: Es fehlt ';' vor 'if'<br />
1&gt;c:\users\config\documents\visual studio 2008\projects\taschenrechner\taschenrechner\taschenrechner.cpp(21) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'cout'<br />
1&gt;c:\users\config\documents\visual studio 2008\projects\taschenrechner\taschenrechner\taschenrechner.cpp(21) : error C2065: 'Ergenis': nichtdeklarierter Bezeichner<br />
1&gt;c:\users\config\documents\visual studio 2008\projects\taschenrechner\taschenrechner\taschenrechner.cpp(27) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'cout'<br />
1&gt;c:\users\config\documents\visual studio 2008\projects\taschenrechner\taschenrechner\taschenrechner.cpp(33) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'cout'<br />
1&gt;c:\users\config\documents\visual studio 2008\projects\taschenrechner\taschenrechner\taschenrechner.cpp(38) : error C2065: 'Ergebis': nichtdeklarierter Bezeichner<br />
1&gt;c:\users\config\documents\visual studio 2008\projects\taschenrechner\taschenrechner\taschenrechner.cpp(39) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'cout'<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://c:\Users\Config\Documents\Visual Studio 2008\Projects\Taschenrechner\Taschenrechner\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;Taschenrechner - 7 Fehler, 0 Warnung(en)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050144</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050144</guid><dc:creator><![CDATA[Status]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:06:22 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:04:58 GMT]]></title><description><![CDATA[<p>Variablennamen dürfen keine Leerzeichen enthalten. Und außerdem solltest du dir einig werden, ob du die Variable nun &quot;value1&quot; oder &quot;Zahl1&quot; nennen willst <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050146</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:04:58 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:05:22 GMT]]></title><description><![CDATA[<p>Ist mir grad schon aufgefallen, habs geändert ;&lt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050147</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050147</guid><dc:creator><![CDATA[Status]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:05:22 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:06:18 GMT]]></title><description><![CDATA[<p>Das ist jetzt echt nicht dein ernst? Ein bisschen Eigeninitiative kann ja wohl nicht schaden....du musst natürlich jetzt alles umbennen, deine Variablen heißen nun value1, value2 und arithmeticOperator und nicht zahl, zahl2 und rechenart....</p>
<p>Lg freeG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050149</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:06:18 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:18:23 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">cin &gt;&gt;Rechenart
</code></pre>
<p>da fehlt ja auch tatsächlich ein Semikolon.</p>
<p>Kein Wunder das der Compiler dann meckert.</p>
<p>abgesehen davon, solltest du mal deine if - else Logik überdenken.</p>
<p>so wie es momentan ist, gibst du immer wenn du nicht : rechnest &quot;existiert nicht&quot;</p>
<p>aus.</p>
<p>vielleicht bietet sich ja auch an dieser stelle für dich ein switch() case um den Operator an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050151</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050151</guid><dc:creator><![CDATA[asdasd]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:18:23 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:19:51 GMT]]></title><description><![CDATA[<p>ausserdem fehlt ja in jedem deiner if() Blöcke nach der Zuweisung auf Ergebnis das ; :o</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050152</guid><dc:creator><![CDATA[asdasd]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:19:51 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:35:12 GMT]]></title><description><![CDATA[<p>Ersetze alle <code>if</code> durch <code>else if</code> ausser dem Ersten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050156</guid><dc:creator><![CDATA[EOutOfResources]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:35:12 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 12:42:43 GMT]]></title><description><![CDATA[<p>Was mir gerade noch aufgefallen ist:</p>
<p>Status schrieb:</p>
<blockquote>
<pre><code class="language-cpp">int Zahl, Zahl2,Ergebnis,Rechenart;

cout&lt;&lt;&quot;Wählen sie die Rechenart\n&quot;;
cin &gt;&gt;Rechenart; //das Semikolon wurde schon erwähnt

if (Rechenart == '+')
{
  ...
}
</code></pre>
</blockquote>
<p>Da d[rfte schon die vernünftige Eingabe des Operators scheitern (es sei denn, der Nutzer kennt die ASCII-Codes von +, - etc auswendig. Du solltest Rechenart lieber als char anlegen.</p>
<p>PS: Wenn du deine Fragen nachträglich umeditierst, verbessert das nicht gerade die Lesbarkeit des Threads <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2050159</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050159</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Sat, 16 Apr 2011 12:42:43 GMT</pubDate></item><item><title><![CDATA[Reply to error C2447 on Sat, 16 Apr 2011 13:11:15 GMT]]></title><description><![CDATA[<p>Bin es aus anderen Foren gewohnt, dass Doppelpost's verboten sind, was da der Fall gewesen wäre ^^.</p>
<p>Bzw. hab den Code zum Laufen bekommen:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;
using namespace std;
int main ()
{
      int Zahl, Zahl2,Ergebnis;
	  char Rechenart;
      std::string arithmeticRechenart; 

	cout &lt;&lt;&quot;Geben sie die erste Zahl ein\n&quot;;
    cin &gt;&gt; Zahl;

    cout &lt;&lt;&quot;Geben sie die zweite Zahln ein \n&quot;;
    cin &gt;&gt; Zahl2;

    cout&lt;&lt;&quot;Waehlen sie die Rechenart\n&quot;;
    cin &gt;&gt;Rechenart;

	if (Rechenart == '+')
	{
        Ergebnis = Zahl + Zahl2;
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
    }

    if (Rechenart == '-')
	{
        Ergebnis = Zahl - Zahl2;
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

    if (Rechenart == '*')
	{
        Ergebnis = Zahl * Zahl2;
			cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

	if ((Rechenart == '/') || (Rechenart == ':'))
	{
         Ergebnis = Zahl / Zahl2;
			 cout&lt;&lt;Ergebnis&lt;&lt;endl; 
	}

    getch ();
    return 0;
}
</code></pre>
<p>Danke für die Hilfe <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/2050168</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2050168</guid><dc:creator><![CDATA[Status]]></dc:creator><pubDate>Sat, 16 Apr 2011 13:11:15 GMT</pubDate></item></channel></rss>