<?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[Nur noch 9 (eigentlich 4 Fehler) im Code]]></title><description><![CDATA[<p>Hallo Forum,.. Seit ein paar Tagen lerne/lese/probiere ich C++ und es gefällt mir.<br />
Ich habe ein Rechen programm (ab)geschrieben und etwas modifiziert, leider kann ich es nicht ausführen, da beim kompilieren Fehler auftreten.<br />
-------------------------------------------------------------------------<br />
Hier ist der Code:</p>
<p>#include &quot;stdafx.h&quot;<br />
#include &lt;iostream&gt;<br />
#include &lt;winsock.h&gt;<br />
#include &lt;String&gt;</p>
<p>int add (int a, int b)<br />
{<br />
int c = a+b<br />
;return c;}<br />
int Sub (int a, int b)<br />
{<br />
int c = a-b<br />
;return c;}<br />
int Mal (int a, int b)<br />
{<br />
int c = a * b<br />
;return c;}<br />
int Div (int a, int b)<br />
{<br />
int c = a/b<br />
;return c;}<br />
int main();<br />
{<br />
cout &lt;&lt; &quot;Wilkommen zum Mathe-Programm, geschrieben von Christian !\n&quot;;<br />
cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n&quot;;<br />
cout &lt;&lt; &quot;Geben Sie die erste Zahl ein !\n&quot;;<br />
int Zahl1;<br />
cin &lt;&lt; Zahl1;<br />
cout &lt;&lt; &quot;Geben Sie nun die zweite Zahl ein !\n&quot;;<br />
int Zahl2;<br />
cin &lt;&lt; Zahl2;<br />
cout &lt;&lt; &quot;Wert1 = &lt;&lt; Zahl1 &lt;&lt; &quot;\n&quot;;<br />
cout &lt;&lt; &quot;Wert2 = &lt;&lt; Zahl2 &lt;&lt; &quot;\n&quot;;</p>
<p>cout &lt;&lt; &quot;\n\&quot;;<br />
cout &lt;&lt; &quot;Bitte geben Sie die Rechenoperation ein !\n&quot;;<br />
cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++\n\n&quot;;<br />
cout &lt;&lt; &quot;Beide Zahlen addieren, also Zahl 1 plus Zahl 2 = 1\n&quot;;<br />
cout &lt;&lt; &quot;Zahlen subtrahieren, also Zahl 1 minus Zahl 2 = 2\n&quot;;<br />
cout &lt;&lt; &quot;Zahlen multiplizieren, also Zahl 1 mal Zahl 2 = 3\n&quot;;<br />
cout &lt;&lt; &quot;Zahlen dividieren, also Zahl 1 durch Zahl 2 = 4\n&quot;;<br />
cout &lt;&lt; &quot;-----------------------------------------------\n\n&quot;;<br />
cout &lt;&lt; &quot;Ihre Eingabe ... : &quot;;</p>
<p>int op;<br />
cin &lt;&lt; op;<br />
if (op == 1 )<br />
{<br />
cout &lt;&lt; &quot;Hier Ihr Ergebniss!\n&quot;;<br />
cout &lt;&lt; add (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;\n\n\n&quot;;<br />
}<br />
else if (op == 2 )<br />
{<br />
cout &lt;&lt; &quot;Das ist Ihr Ergbniss!\n&quot;;<br />
cout &lt;&lt; Sub (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;n\n\n\&quot;;<br />
}<br />
else if (op == 3 )<br />
{<br />
cout &lt;&lt; &quot;Dein Ergebniss Du Lappen!\n&quot;;<br />
cout &lt;&lt; Mal (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;n\n\n\&quot;;<br />
}<br />
else if (op == 3 )<br />
{<br />
cout &lt;&lt; &quot;Kannst das nicht im Kopf, Du Flachzange?\n&quot;;<br />
cout &lt;&lt; Div (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;n\n\n\&quot;;<br />
}<br />
else if ( op &lt; 4)<br />
{<br />
cout &lt;&lt; &quot;Du bist zu blöd zum scheissen, nochmal Neustarten!\n&quot;;<br />
}</p>
<p>cout &lt;&lt; &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;<br />
cout &lt;&lt; &quot;Danke dass Sie meinen Rechner benutzt haben. Sie sind zu dumm zum Kopfrechnen!\n&quot;;<br />
cout &lt;&lt; &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;</p>
<p>return 0;<br />
}</p>
<p>Und jetzt kommen iese Fehler :</p>
<p>1&gt;------ Erstellen gestartet: Projekt: Rechner, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;Rechner.cpp<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(25) : error C2447: '{': Funktionsheader fehlt - Parameterliste im alten Stil?<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(34) : error C2017: Ungültige Escapesequenz<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(34) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(35) : error C2017: Ungültige Escapesequenz<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(35) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(37) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(59) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(65) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(71) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://c:\Users\Heineken\Documents\Visual Studio 2008\Projects\Rechner\Rechner\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;Rechner - 9 Fehler, 0 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
<p>Da steig ich nicht durch ... Ich bin stark der Meinung alles richtig abgeschrieben zu haben (mehrfach geprüft). Viell könnt Ihr mir auf die Sprünge helfen.</p>
<p>BTW: Ich benutze Visual C++ 2008 , kann ich mir links neben den Zeilen die Zeilennummer anzeigen lassen ?</p>
<p>Danke im Voraus - heinek3n</p>
<p>Edit sagt: error c2001 - da feheln wohl -&gt; &quot; &lt;- aber ich weis beim besten Willen nicht wo ....</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/263667/nur-noch-9-eigentlich-4-fehler-im-code</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 14:32:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/263667.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Mar 2010 12:41:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 12:45:58 GMT]]></title><description><![CDATA[<p>Hallo Forum,.. Seit ein paar Tagen lerne/lese/probiere ich C++ und es gefällt mir.<br />
Ich habe ein Rechen programm (ab)geschrieben und etwas modifiziert, leider kann ich es nicht ausführen, da beim kompilieren Fehler auftreten.<br />
-------------------------------------------------------------------------<br />
Hier ist der Code:</p>
<p>#include &quot;stdafx.h&quot;<br />
#include &lt;iostream&gt;<br />
#include &lt;winsock.h&gt;<br />
#include &lt;String&gt;</p>
<p>int add (int a, int b)<br />
{<br />
int c = a+b<br />
;return c;}<br />
int Sub (int a, int b)<br />
{<br />
int c = a-b<br />
;return c;}<br />
int Mal (int a, int b)<br />
{<br />
int c = a * b<br />
;return c;}<br />
int Div (int a, int b)<br />
{<br />
int c = a/b<br />
;return c;}<br />
int main();<br />
{<br />
cout &lt;&lt; &quot;Wilkommen zum Mathe-Programm, geschrieben von Christian !\n&quot;;<br />
cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n&quot;;<br />
cout &lt;&lt; &quot;Geben Sie die erste Zahl ein !\n&quot;;<br />
int Zahl1;<br />
cin &lt;&lt; Zahl1;<br />
cout &lt;&lt; &quot;Geben Sie nun die zweite Zahl ein !\n&quot;;<br />
int Zahl2;<br />
cin &lt;&lt; Zahl2;<br />
cout &lt;&lt; &quot;Wert1 = &lt;&lt; Zahl1 &lt;&lt; &quot;\n&quot;;<br />
cout &lt;&lt; &quot;Wert2 = &lt;&lt; Zahl2 &lt;&lt; &quot;\n&quot;;</p>
<p>cout &lt;&lt; &quot;\n\&quot;;<br />
cout &lt;&lt; &quot;Bitte geben Sie die Rechenoperation ein !\n&quot;;<br />
cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++\n\n&quot;;<br />
cout &lt;&lt; &quot;Beide Zahlen addieren, also Zahl 1 plus Zahl 2 = 1\n&quot;;<br />
cout &lt;&lt; &quot;Zahlen subtrahieren, also Zahl 1 minus Zahl 2 = 2\n&quot;;<br />
cout &lt;&lt; &quot;Zahlen multiplizieren, also Zahl 1 mal Zahl 2 = 3\n&quot;;<br />
cout &lt;&lt; &quot;Zahlen dividieren, also Zahl 1 durch Zahl 2 = 4\n&quot;;<br />
cout &lt;&lt; &quot;-----------------------------------------------\n\n&quot;;<br />
cout &lt;&lt; &quot;Ihre Eingabe ... : &quot;;</p>
<p>int op;<br />
cin &lt;&lt; op;<br />
if (op == 1 )<br />
{<br />
cout &lt;&lt; &quot;Hier Ihr Ergebniss!\n&quot;;<br />
cout &lt;&lt; add (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;\n\n\n&quot;;<br />
}<br />
else if (op == 2 )<br />
{<br />
cout &lt;&lt; &quot;Das ist Ihr Ergbniss!\n&quot;;<br />
cout &lt;&lt; Sub (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;n\n\n\&quot;;<br />
}<br />
else if (op == 3 )<br />
{<br />
cout &lt;&lt; &quot;Dein Ergebniss Du Lappen!\n&quot;;<br />
cout &lt;&lt; Mal (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;n\n\n\&quot;;<br />
}<br />
else if (op == 3 )<br />
{<br />
cout &lt;&lt; &quot;Kannst das nicht im Kopf, Du Flachzange?\n&quot;;<br />
cout &lt;&lt; Div (Zahl1,Zahl2);<br />
cout &lt;&lt; &quot;n\n\n\&quot;;<br />
}<br />
else if ( op &lt; 4)<br />
{<br />
cout &lt;&lt; &quot;Du bist zu blöd zum scheissen, nochmal Neustarten!\n&quot;;<br />
}</p>
<p>cout &lt;&lt; &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;<br />
cout &lt;&lt; &quot;Danke dass Sie meinen Rechner benutzt haben. Sie sind zu dumm zum Kopfrechnen!\n&quot;;<br />
cout &lt;&lt; &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;</p>
<p>return 0;<br />
}</p>
<p>Und jetzt kommen iese Fehler :</p>
<p>1&gt;------ Erstellen gestartet: Projekt: Rechner, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;Rechner.cpp<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(25) : error C2447: '{': Funktionsheader fehlt - Parameterliste im alten Stil?<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(34) : error C2017: Ungültige Escapesequenz<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(34) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(35) : error C2017: Ungültige Escapesequenz<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(35) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(37) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(59) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(65) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;c:\users\heineken\documents\visual studio 2008\projects\rechner\rechner\rechner.cpp(71) : error C2001: Zeilenvorschub in Konstante.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://c:\Users\Heineken\Documents\Visual Studio 2008\Projects\Rechner\Rechner\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;Rechner - 9 Fehler, 0 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
<p>Da steig ich nicht durch ... Ich bin stark der Meinung alles richtig abgeschrieben zu haben (mehrfach geprüft). Viell könnt Ihr mir auf die Sprünge helfen.</p>
<p>BTW: Ich benutze Visual C++ 2008 , kann ich mir links neben den Zeilen die Zeilennummer anzeigen lassen ?</p>
<p>Danke im Voraus - heinek3n</p>
<p>Edit sagt: error c2001 - da feheln wohl -&gt; &quot; &lt;- aber ich weis beim besten Willen nicht wo ....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873261</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873261</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 12:45:58 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 12:44:57 GMT]]></title><description><![CDATA[<ol>
<li>Bitte Code-Tag für Code benutzen.</li>
<li>int main(); - Das Semikolon gehört dort nicht hin.</li>
<li>cout und cin sind im Namensraum std. Also entweder immer std::cout schreiben, oder using namespace std; nutzen.</li>
</ol>
]]></description><link>https://www.c-plusplus.net/forum/post/1873265</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873265</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Wed, 24 Mar 2010 12:44:57 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 12:46:02 GMT]]></title><description><![CDATA[<p>Das kann ja keiner lesen. Benutze bitte die cpp-Tags! Ich mache dies das erste Mal für dich:</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;iostream&gt;
#include &lt;winsock.h&gt;
#include &lt;String&gt;

int
add (int a, int b)
{
  int c = a + b;
  return c;
}

int
Sub (int a, int b)
{
  int c = a - b;
  return c;
}

int
Mal (int a, int b)
{
  int c = a * b;
  return c;
}

int
Div (int a, int b)
{
  int c = a / b;
  return c;
}

int main ();
{
  cout &lt;&lt; &quot;Wilkommen zum Mathe-Programm, geschrieben von Christian !\n&quot;;
  cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n&quot;;
  cout &lt;&lt; &quot;Geben Sie die erste Zahl ein !\n&quot;;
  int Zahl1;
  cin &lt;&lt; Zahl1;
  cout &lt;&lt; &quot;Geben Sie nun die zweite Zahl ein !\n&quot;;
  int Zahl2;
  cin &lt;&lt; Zahl2;
  cout &lt;&lt; &quot;Wert1 = &lt;&lt; Zahl1 &lt;&lt; &quot; \ n &quot;;
cout &lt;&lt; &quot; Wert2 = &lt;&lt;Zahl2 &lt;&lt; &quot;\n&quot;;

  cout &lt;&lt; &quot;\n&quot;;
  cout &lt;&lt; &quot;Bitte geben Sie die Rechenoperation ein !\n&quot;;
  cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++\n\n&quot;;
  cout &lt;&lt; &quot;Beide Zahlen addieren, also Zahl 1 plus Zahl 2 = 1\n&quot;;
  cout &lt;&lt; &quot;Zahlen subtrahieren, also Zahl 1 minus Zahl 2 = 2\n&quot;;
  cout &lt;&lt; &quot;Zahlen multiplizieren, also Zahl 1 mal Zahl 2 = 3\n&quot;;
  cout &lt;&lt; &quot;Zahlen dividieren, also Zahl 1 durch Zahl 2 = 4\n&quot;;
  cout &lt;&lt; &quot;-----------------------------------------------\n\n&quot;;
  cout &lt;&lt; &quot;Ihre Eingabe ... : &quot;;

  int op;
  cin &lt;&lt; op;
  if (op == 1)
    {
      cout &lt;&lt; &quot;Hier Ihr Ergebniss!\n&quot;;
      cout &lt;&lt; add (Zahl1, Zahl2);
      cout &lt;&lt; &quot;\n\n\n&quot;;
    }
  else if (op == 2)
    {
      cout &lt;&lt; &quot;Das ist Ihr Ergbniss!\n&quot;;
      cout &lt;&lt; Sub (Zahl1, Zahl2);
      cout &lt;&lt; &quot;n\n\n&quot;;
    }
  else if (op == 3)
    {
      cout &lt;&lt; &quot;Dein Ergebniss Du Lappen!\n&quot;;
      cout &lt;&lt; Mal (Zahl1, Zahl2);
      cout &lt;&lt; &quot;n\n\n&quot;;
    }
  else if (op == 3)
    {
      cout &lt;&lt; &quot;Kannst das nicht im Kopf, Du Flachzange?\n&quot;;
      cout &lt;&lt; Div (Zahl1, Zahl2);
      cout &lt;&lt; &quot;n\n\n&quot;;
    }
  else if (op &lt; 4)
    {
      cout &lt;&lt; &quot;Du bist zu blöd zum scheissen, nochmal Neustarten!\n&quot;;
    }

  cout &lt;&lt;
    &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;
  cout &lt;&lt;
    &quot;Danke dass Sie meinen Rechner benutzt haben. Sie sind zu dumm zum Kopfrechnen!\n&quot;;
  cout &lt;&lt;
    &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;

  return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1873267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873267</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 24 Mar 2010 12:46:02 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 12:46:04 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>hinter dem int main() steht ein Semikolon - darf aber nicht.<br />
In Zeile 34 und 35 guck mal nach, ob jedes öffnende Anführungszeichen auch ein schliessendes hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873268</guid><dc:creator><![CDATA[Jockelx]]></dc:creator><pubDate>Wed, 24 Mar 2010 12:46:04 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 12:47:13 GMT]]></title><description><![CDATA[<p>1. Semikolon nach &quot;int main()&quot; muss weg (die Funktion soll ja nicht da zu Ende sein, sondern alles folgende beinhalten =&gt; geschweifte Klammern).</p>
<p>2. Setz mal mehr Anführungszeichen! <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="😃"
    /> Vielleicht eher so:</p>
<pre><code class="language-cpp">cout &lt;&lt; &quot;Wert1 = &quot; &lt;&lt; Zahl1 &lt;&lt; &quot;\n&quot;;
</code></pre>
<p>3. Ergibt sich durch 2.</p>
<p>4. + 5. Nochmal dasselbe...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873269</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873269</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 24 Mar 2010 12:47:13 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 12:48:00 GMT]]></title><description><![CDATA[<p>seid ihr schnell,.. ich probiere es gleich einmal ... danke !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873271</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873271</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 12:48:00 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 13:28:47 GMT]]></title><description><![CDATA[<p>Ein fehler ist übrig geblieben und zwar:<br />
------------------------------------------------------------------------------<br />
(37) : error C2447: '{': Funktionsheader fehlt - Parameterliste im alten Stil?<br />
------------------------------------------------------------------------------</p>
<p>Der Rest waren tatsächlich &quot;Rechtschreibfehler&quot; bei cin habe ich &lt;&lt; statt &gt;&gt; verwendet, zweimal hatte ich ein [space] zuviel und mal ein Simikolon zu viel !</p>
<p>Der letzte Fehler jedoch sagt mir im Moment nix.. ich werde mal googeln.</p>
<p>Zu guter Letzt : Danke für eure sauschnellen Antworten ! Ich hoffe, dass ich hier hin und wieder Support bekomme.</p>
<p>EDIT sagt:</p>
<p>Ich komm nicht dahinter... es scheint ja an den #include´s zu liegen... fehlt da einer oder sind sie in der falschen Reihenfolge (wenn sowas überhaupt relevant ist ?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873309</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873309</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 13:28:47 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 13:26:41 GMT]]></title><description><![CDATA[<p>Heinek3n schrieb:</p>
<blockquote>
<p>Ein fehler ist übrig geblieben und zwar:<br />
------------------------------------------------------------------------------<br />
(37) : error C2447: '{': Funktionsheader fehlt - Parameterliste im alten Stil?<br />
------------------------------------------------------------------------------</p>
</blockquote>
<p>Das dürfte das Semikolon hinter der main-Funktion sein (hatte ich schon geschrieben). Du legst damit quasi nur eine Deklaration (keine Definition) der Funktion an, und im Anschluss steht dann im &quot;leeren Raum&quot; Inhalt in geschweiften Klammern. Dort darf aber nur sowas stehen, wenn es zu einer Funktion/Klasse gehört. Also meckert der Compiler, dass der Kopf dieser Funktion fehlt.</p>
<p>falsch:</p>
<pre><code class="language-cpp">int main();
{
</code></pre>
<p>richtig:</p>
<pre><code class="language-cpp">int main()
{
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1873312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873312</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 24 Mar 2010 13:26:41 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 13:39:19 GMT]]></title><description><![CDATA[<p>Aye, tatsache.. den hatte ich vergessen...</p>
<p>Jetzt habe ich nurnoch den Fehler:</p>
<p>error C2065: 'cout': nichtdeklarierter Bezeichner</p>
<p>Das sollte ich ja wegbekommen ,wenn ich vor jedes cout oder cin ein std:: setze<br />
ODER ein use namespace std unter die #include´s setze, richtig ?</p>
<p>ZU: use namespace std<br />
Irgendetwas fehlt da doch .. hab schleierhaft was in Erinnerung. Und muss es an eine bestimmte Stelle oder einfach direkt unter den 'include`s ?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873323</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 13:39:19 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 13:43:16 GMT]]></title><description><![CDATA[<p>Du musst &quot;using namespace std;&quot; notieren, nicht &quot;use&quot;.</p>
<p>Übrigens: wenn du Min schon Sub nennst, dann nenne Mal doch auch Mul! <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/1873324</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873324</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 24 Mar 2010 13:43:16 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 13:49:13 GMT]]></title><description><![CDATA[<p>_matze schrieb:</p>
<blockquote>
<p>Du musst &quot;using namespace std;&quot; notieren, nicht &quot;use&quot;.</p>
<p>Übrigens: wenn du Min schon Sub nennst, dann nenne Mal doch auch Mul! <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>
</blockquote>
<p>wenn ich using namespace std; unter die #include´s setzte bekomme ich lauter :</p>
<p>error C2784: &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;std::operator &lt;&lt;(std::basic_ostream&lt;_Elem,_Traits&gt; &amp;,const char *)&quot;: template-Argument für &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;&quot; konnte nicht von &quot;std::istream&quot; hergeleitet werden. - FEHLER</p>
<p>Und das mit MIN und MUL - ist das ironisch gemeint ? Bin wirklich erst am Anfang meiner C++ Laufbahn <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873330</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873330</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 13:49:13 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 13:57:25 GMT]]></title><description><![CDATA[<p>Heinek3n schrieb:</p>
<blockquote>
<p>wenn ich using namespace std; unter die #include´s setzte bekomme ich lauter :</p>
<p>error C2784: &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;std::operator &lt;&lt;(std::basic_ostream&lt;_Elem,_Traits&gt; &amp;,const char *)&quot;: template-Argument für &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;&quot; konnte nicht von &quot;std::istream&quot; hergeleitet werden. - FEHLER</p>
</blockquote>
<p>Zeig bitte noch mal den (kompletten) aktuellen Code.</p>
<p>Heinek3n schrieb:</p>
<blockquote>
<p>Und das mit MIN und MUL - ist das ironisch gemeint ? Bin wirklich erst am Anfang meiner C++ Laufbahn <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
</blockquote>
<p>War nur Spaß. <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="😉"
    /> Du hast die Funktionen Add, Sub und Div notiert, aber dann Mal (nicht Mul wie multiplizieren). Nicht von mir verwirren lassen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873336</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873336</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 24 Mar 2010 13:57:25 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 14:38:29 GMT]]></title><description><![CDATA[<p>Ich muss zugeben ich mache nicht viel mit C++<br />
aber</p>
<pre><code class="language-cpp">#include &lt;String&gt;
</code></pre>
<p>mit grossem S kenne ich bisher noch nicht <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>
<p>MfG f.-th.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873357</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Wed, 24 Mar 2010 14:38:29 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 14:58:21 GMT]]></title><description><![CDATA[<p>f.-th. schrieb:</p>
<blockquote>
<p>Ich muss zugeben ich mache nicht viel mit C++<br />
aber</p>
<pre><code class="language-cpp">#include &lt;String&gt;
</code></pre>
<p>mit grossem S kenne ich bisher noch nicht <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>
<p>MfG f.-th.</p>
</blockquote>
<p>Ist zumindest auf Windows-Systemen (Dateinamen nicht case-sensitive) wahrscheinlich egal, oder? Trotzdem ungewohnt... <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/1873365</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873365</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 24 Mar 2010 14:58:21 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 15:01:04 GMT]]></title><description><![CDATA[<p>Heinek3n schrieb:</p>
<blockquote>
<pre><code>error C2784: &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;std::operator &lt;&lt;(std::basic_ostream&lt;_Elem,_Traits&gt; &amp;,const char *)&quot;: template-Argument für &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;&quot; konnte nicht von &quot;std::istream&quot; hergeleitet werden. - FEHLER
</code></pre>
</blockquote>
<p>Naja, schauen wir doch mal was da genau steht:</p>
<p>Der Compiler hat einen <em>operator&lt;&lt;</em> gefunden, mit dem er Probleme hat. Genauer gesagt, mit dessen ersten Parameter, er erwartet einen <em>std::basic_ostream&lt;E,T&gt;&amp;</em>, findet aber nur ein <em>std::istream</em>.<br />
Zusammengefasst: du hast <em>operator&lt;&lt;</em> auf einen <em>istream</em> angewandt.</p>
<p>Wo, das sollte dir die Fehlermeldung eigentlich auch sagen, wenn du sie komplett liest. Oder du schaust selbst im Code nach:</p>
<pre><code class="language-cpp">/* ... */
  int Zahl1;
  cin &lt;&lt; Zahl1;
  cout &lt;&lt; &quot;Geben Sie nun die zweite Zahl ein !\n&quot;;
  int Zahl2;
  cin &lt;&lt; Zahl2;
/* ... */
  int op;
  cin &lt;&lt; op;
/* ... */
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1873368</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873368</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Wed, 24 Mar 2010 15:01:04 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 17:56:46 GMT]]></title><description><![CDATA[<pre><code>#include &quot;stdafx.h&quot;
#include &lt;iostream&gt;
#include &lt;winsock.h&gt;
#include &lt;String&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;Math.h&gt;
#include &lt;New.h&gt;
#include &lt;fstream&gt;

int
add (int a, int b)
{
  int c = a + b;
  return c;
}

int
Sub (int a, int b)
{
  int c = a - b;
  return c;
}

int
Mal (int a, int b)
{
  int c = a * b;
  return c;
}

int
Div (int a, int b)
{
  int c = a / b;
  return c;
}

int main ()
{
  cout &lt;&lt; &quot;Wilkommen zum Mathe-Programm, geschrieben von Christian ! \n&quot;;
  cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n&quot;;
  cout &lt;&lt; &quot;Geben Sie die erste Zahl ein ! \n&quot;;
  int Zahl1;
  cin &gt;&gt; Zahl1;
  cout &lt;&lt; &quot;Geben Sie nun die zweite Zahl ein ! \n&quot;;
  int Zahl2;
  cin &gt;&gt; Zahl2;
  cout &lt;&lt; &quot;Wert1 = &quot; &lt;&lt; Zahl1 &lt;&lt; &quot; \n&quot;;
cout &lt;&lt; &quot; Wert2 = &quot; &lt;&lt; Zahl2 &lt;&lt; &quot;\n&quot;;

  cout &lt;&lt; &quot;\n&quot;;
  cout &lt;&lt; &quot;Bitte geben Sie die Rechenoperation ein !\n&quot;;
  cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++\n\n&quot;;
  cout &lt;&lt; &quot;Beide Zahlen addieren, also Zahl 1 plus Zahl 2 = 1\n&quot;;
  cout &lt;&lt; &quot;Zahlen subtrahieren, also Zahl 1 minus Zahl 2 = 2\n&quot;;
  cout &lt;&lt; &quot;Zahlen multiplizieren, also Zahl 1 mal Zahl 2 = 3\n&quot;;
  cout &lt;&lt; &quot;Zahlen dividieren, also Zahl 1 durch Zahl 2 = 4\n&quot;;
  cout &lt;&lt; &quot;-----------------------------------------------\n\n&quot;;
  cout &lt;&lt; &quot;Ihre Eingabe ... : &quot;;

  int op;
  cin &lt;&lt; op;
  if (op == 1)
    {
      cout &lt;&lt; &quot;Hier Ihr Ergebniss!\n&quot;;
      cout &lt;&lt; add (Zahl1, Zahl2);
      cout &lt;&lt; &quot;\n\n\n&quot;;
    }
  else if (op == 2)
    {
      cout &lt;&lt; &quot;Das ist Ihr Ergbniss!\n&quot;;
      cout &lt;&lt; Sub (Zahl1, Zahl2);
      cout &lt;&lt; &quot;n\n\n&quot;;
    }
  else if (op == 3)
    {
      cout &lt;&lt; &quot;Dein Ergebniss Du Lappen!\n&quot;;
      cout &lt;&lt; Mal (Zahl1, Zahl2);
      cout &lt;&lt; &quot;n\n\n&quot;;
    }
  else if (op == 3)
    {
      cout &lt;&lt; &quot;Kannst das nicht im Kopf, Du Flachzange?\n&quot;;
      cout &lt;&lt; Div (Zahl1, Zahl2);
      cout &lt;&lt; &quot;n\n\n&quot;;
    }
  else if (op &lt; 4)
    {
      cout &lt;&lt; &quot;Du bist zu blöd zum scheissen, nochmal Neustarten!\n&quot;;
    }

  cout &lt;&lt;
    &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;
  cout &lt;&lt;
    &quot;Danke dass Sie meinen Rechner benutzt haben. Sie sind zu dumm zum Kopfrechnen!\n&quot;;
  cout &lt;&lt;
    &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;

  return 0;
}
</code></pre>
<p>Fehlermeldungen nun:<br />
--------------------<br />
34 x error C2065: 'cout': nichtdeklarierter Bezeichner<br />
Mit den #includes hab ich n bisschen rumgespielt, nach dem MOtto: Mehr kann nicht schaden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873469</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873469</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 17:56:46 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 18:06:12 GMT]]></title><description><![CDATA[<p>Und wenn ich using namespace std; unter die #include´s setzte bekomme ich lauter :</p>
<p>error C2784: &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;std::operator &lt;&lt;(std::basic_ostream&lt;_Elem,_Traits&gt; &amp;,const char *)&quot;: template-Argument für &quot;std::basic_ostream&lt;_Elem,_Traits&gt; &amp;&quot; konnte nicht von &quot;std::istream&quot; hergeleitet werden. - FEHLER <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873473</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 18:06:12 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 18:08:20 GMT]]></title><description><![CDATA[<p>Wirf mal die ganzen unsinnigen Header raus die du da einbindest....</p>
<p>Für deinen Code benötigst du nur &lt;iostream&gt;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873474</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Wed, 24 Mar 2010 18:08:20 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 18:15:45 GMT]]></title><description><![CDATA[<p>Irgendwie wird der Code jedesmal schlechter, anstatt besser. Liest du dir überhaupt durch, was hier geschrieben wird?</p>
<pre><code class="language-cpp">// #include &quot;stdafx.h&quot;      Wozu?
#include &lt;iostream&gt;
// #include &lt;winsock.h&gt;     Wozu?
// #include &lt;String&gt;        string schreibt man klein. Außerdem: Wozu?
// #include &lt;stdio.h&gt;       Das heißt erstens cstdio und zweitens: Wozu?
// #include &lt;stdlib.h&gt;      Das heißt ersten cstdlib und zweitens: Wozu?
// #include &lt;Math.h&gt;        math.h schreibt man klein und zweitens heißt das cmath, drittens: Wozu?
// #include &lt;New.h&gt;         1. new.h schreibt man klein. 2. Das heißt new, nicht new.h. 3. Wozu?
// #include &lt;fstream&gt;       Wozu?

using namespace std;    // Du verwendest allerlei Zeug aus std, da ist es durchaus gerechtfertigt, ein using namespace zu setzen

int
add (int a, int b)
{
  int c = a + b;
  return c;
}

int
Sub (int a, int b)
{
  int c = a - b;
  return c;
}

int
Mal (int a, int b)
{
  int c = a * b;
  return c;
}

int
Div (int a, int b)
{
  int c = a / b;
  return c;
}

int main ()
{
  cout &lt;&lt; &quot;Wilkommen zum Mathe-Programm, geschrieben von Christian ! \n&quot;;
  cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n&quot;;
  cout &lt;&lt; &quot;Geben Sie die erste Zahl ein ! \n&quot;;
  int Zahl1;
  cin &gt;&gt; Zahl1;
  cout &lt;&lt; &quot;Geben Sie nun die zweite Zahl ein ! \n&quot;;
  int Zahl2;
  cin &gt;&gt; Zahl2;
  cout &lt;&lt; &quot;Wert1 = &quot; &lt;&lt; Zahl1 &lt;&lt; &quot; \n&quot;;
cout &lt;&lt; &quot; Wert2 = &quot; &lt;&lt; Zahl2 &lt;&lt; &quot;\n&quot;;

  cout &lt;&lt; &quot;\n&quot;;
  cout &lt;&lt; &quot;Bitte geben Sie die Rechenoperation ein !\n&quot;;
  cout &lt;&lt; &quot;+++++++++++++++++++++++++++++++++++++++++\n\n&quot;;
  cout &lt;&lt; &quot;Beide Zahlen addieren, also Zahl 1 plus Zahl 2 = 1\n&quot;;
  cout &lt;&lt; &quot;Zahlen subtrahieren, also Zahl 1 minus Zahl 2 = 2\n&quot;;
  cout &lt;&lt; &quot;Zahlen multiplizieren, also Zahl 1 mal Zahl 2 = 3\n&quot;;
  cout &lt;&lt; &quot;Zahlen dividieren, also Zahl 1 durch Zahl 2 = 4\n&quot;;
  cout &lt;&lt; &quot;-----------------------------------------------\n\n&quot;;
  cout &lt;&lt; &quot;Ihre Eingabe ... : &quot;;

  int op;
  cin &gt;&gt; op;               // Das ist &gt;&gt; und nicht &lt;&lt;
  if (op == 1)
    {
      cout &lt;&lt; &quot;Hier Ihr Ergebniss!\n&quot;;
      cout &lt;&lt; add (Zahl1, Zahl2);
      cout &lt;&lt; &quot;\n\n\n&quot;;
    }
  else if (op == 2)
    {
      cout &lt;&lt; &quot;Das ist Ihr Ergbniss!\n&quot;;
      cout &lt;&lt; Sub (Zahl1, Zahl2);
      cout &lt;&lt; &quot;\n\n\n&quot;;     // Du meinst wohl dreimal newline, nicht n und zweimal newline
    }
  else if (op == 3)
    {
      cout &lt;&lt; &quot;Dein Ergebniss Du Lappen!\n&quot;;
      cout &lt;&lt; Mal (Zahl1, Zahl2);
      cout &lt;&lt; &quot;\n\n\n&quot;;     // Siehe oben
    }
  else if (op == 3)
    {
      cout &lt;&lt; &quot;Kannst das nicht im Kopf, Du Flachzange?\n&quot;;
      cout &lt;&lt; Div (Zahl1, Zahl2);
      cout &lt;&lt; &quot;\n\n\n&quot;;     // Siehe oben
    }
  else if (op &lt; 4)
    {
      cout &lt;&lt; &quot;Du bist zu blöd zum scheissen, nochmal Neustarten!\n&quot;;
    }

  cout &lt;&lt;
    &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;
  cout &lt;&lt;
    &quot;Danke dass Sie meinen Rechner benutzt haben. Sie sind zu dumm zum Kopfrechnen!\n&quot;;
  cout &lt;&lt;
    &quot;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n&quot;;

  return 0;
}
</code></pre>
<p>Denk bitte über das nach, was ich kommentiert habe anstatt einfach nur froh zu sein, dass dein Programm jetzt funktioniert. Du kannst viel dabei lernen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873477</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 24 Mar 2010 18:15:45 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 18:15:30 GMT]]></title><description><![CDATA[<p>Hab ich ... immernoch</p>
<p>error C2065: 'cout': nichtdeklarierter Bezeichner</p>
<p>langasam verzweifel ich ... könnte jemand den Code mal kopieren und bei sich versuchen zu kompilieren ?</p>
<p>Wäre shr nett...</p>
<p>Greez Heinek3n</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873478</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873478</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 18:15:30 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 18:22:42 GMT]]></title><description><![CDATA[<p>So, wenn ich nur #include &lt;iostream&gt; benutze bekomme ich diesen Fehler:</p>
<p>warning C4627: &quot;#include &lt;iostream&gt;&quot;: Wird bei der Suche nach Verwendung des vorkompilierten Headers übersprungen.<br />
1&gt; &quot;stdafx.h&quot; Direktive hinzufügen oder vorkompilierten Header erneut erstellen</p>
<p>wenn ich #include &quot;stdafx.h&quot; UND using namespace std; darunter schreibe, kommt wiedderum:</p>
<p>error C2065: 'cout': nichtdeklarierter Bezeichner (34 x)</p>
<p>und</p>
<p>error C2871: 'std': Es ist kein Namespace mit diesem Namen vorhanden (1x)</p>
<p>Wo ist da der Wurm drin ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873484</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 18:22:42 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 18:22:17 GMT]]></title><description><![CDATA[<p>Heinek3n schrieb:</p>
<blockquote>
<p>Hab ich ... immernoch</p>
<p>error C2065: 'cout': nichtdeklarierter Bezeichner</p>
<p>langasam verzweifel ich ... könnte jemand den Code mal kopieren und bei sich versuchen zu kompilieren ?</p>
<p>Wäre shr nett...</p>
<p>Greez Heinek3n</p>
</blockquote>
<p>Bezieht sich das auf meine Korrekturen oder auf die von Janjan? Wenn mein Code nicht compiliert, solltest du auf der Stelle deinen Compiler löschen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873486</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873486</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 24 Mar 2010 18:22:17 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 18:23:28 GMT]]></title><description><![CDATA[<p>Denkst du auch ein wenig mit, oder probierst du nur wild rum?<br />
&lt;iostream&gt; wird benötigt, denn dort sind die Streaming-Klassen definiert die du mit cout benutzt. Dort ist auch cout deklariert. Also MUSST du diesen Header einbinden.</p>
<p>Wenn du &quot;using namespace std;&quot; nicht nutzt, so muss du jedesmal den Namensraum von cout mit angeben, das heußt du musst immer std::cout schreiben anstatt cout.</p>
<p>&quot;stdafx.h&quot; musst du einbinden, weil du das vorkompiliere von Headerdateien in Visual Studio aktiviert hast für dein Projekt. Schlechte Idee. Am besten du erstellst ein neues leeres Win32 Console Application Projekt, und machst einen Haken bei &quot;Empty project&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873487</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873487</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Wed, 24 Mar 2010 18:23:28 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 19:08:35 GMT]]></title><description><![CDATA[<p>Natürlich versuche ich mitzudenken,.. wie gesagt, ich bin seit einer Woche dabei.</p>
<blockquote>
<p>&lt;iostream&gt; wird benötigt, denn dort sind die Streaming-Klassen definiert die du mit cout benutzt. Dort ist auch cout deklariert. Also MUSST du diesen Header einbinden.</p>
</blockquote>
<p>Dann bekomme ich die erste Fehlermeldung:</p>
<p>warning C4627: &quot;#include &lt;iostream&gt;&quot;: Wird bei der Suche nach Verwendung des vorkompilierten Headers übersprungen.<br />
1&gt; &quot;stdafx.h&quot; Direktive hinzufügen oder vorkompilierten Header erneut erstellen.</p>
<blockquote>
<p>Wenn du &quot;using namespace std;&quot; nicht nutzt,[...]</p>
</blockquote>
<p>Nutze ich, hier die ersten drei Zeilen des Codes:</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;stdafx.h&quot;
using namespace std;
</code></pre>
<p>Da bekomme ich den Fehler:</p>
<p>error C2871: 'std': Es ist kein Namespace mit diesem Namen vorhanden</p>
<p>und weiter:</p>
<p>error C2065: 'cout' / 'cin' : nichtdeklarierter Bezeichner</p>
<p>Ich werd weiter in meinem Wälzer weiterlesen.. hab jez noch ca 700 Seiten vor mir.</p>
<p>Falls jmd doch noch eine Lösung hat -die er selbst erfolgreich kompiliert hat-<br />
würde ich mich freuen, diesen zu bekommen.</p>
<p>THX - Heinek3n</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873505</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873505</guid><dc:creator><![CDATA[Heinek3n]]></dc:creator><pubDate>Wed, 24 Mar 2010 19:08:35 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 19:13:04 GMT]]></title><description><![CDATA[<p>Lies doch bitte mal mehr als die ersten drei Sätze der Beiträge:</p>
<p>Janjan schrieb:</p>
<blockquote>
<p>&quot;stdafx.h&quot; musst du einbinden, weil du das vorkompiliere von Headerdateien in Visual Studio aktiviert hast für dein Projekt. Schlechte Idee. Am besten du erstellst ein neues leeres Win32 Console Application Projekt, und machst einen Haken bei &quot;Empty project&quot;.</p>
</blockquote>
<p>Ich klinke mich hiermit aus der Diskussion aus. Manche Leute wollen einfach nicht geholfen werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873508</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 24 Mar 2010 19:13:04 GMT</pubDate></item><item><title><![CDATA[Reply to Nur noch 9 (eigentlich 4 Fehler) im Code on Wed, 24 Mar 2010 19:32:52 GMT]]></title><description><![CDATA[<p>Der Code von SeppJ auf Seite 2 ist einwandfrei kompilierbar. Die einzige Änderung, die du machen musst, ist #include &quot;stdafx.h&quot; ganz oben einzufügen (bzw. wieder zu 'entauskommentieren'), wenn präkompilierte Header bei dir eingeschaltet sind (was offensichtlich der Fall ist). Ich garantiere dir, dass du, wenn du diesen Code 1:1 übernimmst und meinen Rat bzw. präkompilierte Header befolgst, das Programm übersetzen kannst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1873520</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1873520</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 24 Mar 2010 19:32:52 GMT</pubDate></item></channel></rss>