<?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[Hilfe bei meinem Programm]]></title><description><![CDATA[<p>Hallo,<br />
also ich habe hier ma ein eigentlich simples Nimm-Spiel programmiert, jedoch bekomme ich es nicht zum laufen kann mir einer sagen warum?? In C++ geschrieben der Compiler meckter schon in der Zeile mit dem &quot;Jetzt liegen.....&quot;</p>
<pre><code class="language-cpp">#include&lt;iostream&gt;
int zugmensch(int anzahlmuenzen)
{
    int ergebnis
    cout&lt;&lt;&quot;Jetzt liegen&quot;&lt;&lt;anzahlmuenzen&lt;&lt;&quot;Muenzen auf dem Tisch&quot;&lt;&lt;endl;
    cout&lt;&lt;&quot;Wieviel moechten sie nehmen&quot;;
    cin&gt;&gt;ergebnis;
    return ergebnis;
};

int zugrechner(int anzahlmuenzen)
{
    int wunschzug=anzahlmuenzen%4
    if(wunschzug==0)
    {
    return 1;
    else 
    return wunschzug;
};
void main()
{
    int anzahlmuenzen;

    cout&lt;&lt;&quot;Wieviele Mueznen werden gespielt?\n&quot;;
    cin&gt;&gt; anzahlmuenzen;

    while(true)
    {
               anzahlmuenzen=anzahlmuenzen-zugrechner(anzahlmuenzen);

               if(anzahlmuenzen==0)
               {
               cout&lt;&lt;&quot;Ich habe gewonnen!&quot;&lt;&lt;endl;
               return;
               }

               anzahlmuenzen=anzahlmuenzen-zugmensch(anzahlmuenzen);

               if(anzahlmuenzen==0)
               {
                cout&lt;&lt;&quot;Sie haben gewonnen!&quot;&lt;&lt;endl;
                return;
                }
    }
}
</code></pre>
<p>würde mich über hilfe freuen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/177538/hilfe-bei-meinem-programm</link><generator>RSS for Node</generator><lastBuildDate>Sat, 27 Jun 2026 21:25:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/177538.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Apr 2007 14:37:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 14:37:47 GMT]]></title><description><![CDATA[<p>Hallo,<br />
also ich habe hier ma ein eigentlich simples Nimm-Spiel programmiert, jedoch bekomme ich es nicht zum laufen kann mir einer sagen warum?? In C++ geschrieben der Compiler meckter schon in der Zeile mit dem &quot;Jetzt liegen.....&quot;</p>
<pre><code class="language-cpp">#include&lt;iostream&gt;
int zugmensch(int anzahlmuenzen)
{
    int ergebnis
    cout&lt;&lt;&quot;Jetzt liegen&quot;&lt;&lt;anzahlmuenzen&lt;&lt;&quot;Muenzen auf dem Tisch&quot;&lt;&lt;endl;
    cout&lt;&lt;&quot;Wieviel moechten sie nehmen&quot;;
    cin&gt;&gt;ergebnis;
    return ergebnis;
};

int zugrechner(int anzahlmuenzen)
{
    int wunschzug=anzahlmuenzen%4
    if(wunschzug==0)
    {
    return 1;
    else 
    return wunschzug;
};
void main()
{
    int anzahlmuenzen;

    cout&lt;&lt;&quot;Wieviele Mueznen werden gespielt?\n&quot;;
    cin&gt;&gt; anzahlmuenzen;

    while(true)
    {
               anzahlmuenzen=anzahlmuenzen-zugrechner(anzahlmuenzen);

               if(anzahlmuenzen==0)
               {
               cout&lt;&lt;&quot;Ich habe gewonnen!&quot;&lt;&lt;endl;
               return;
               }

               anzahlmuenzen=anzahlmuenzen-zugmensch(anzahlmuenzen);

               if(anzahlmuenzen==0)
               {
                cout&lt;&lt;&quot;Sie haben gewonnen!&quot;&lt;&lt;endl;
                return;
                }
    }
}
</code></pre>
<p>würde mich über hilfe freuen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257282</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257282</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Sun, 01 Apr 2007 14:37:47 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 14:52:37 GMT]]></title><description><![CDATA[<p>Dann freu dich mal nicht zu früh.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257302</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257302</guid><dc:creator><![CDATA[asdasdsadas]]></dc:creator><pubDate>Sun, 01 Apr 2007 14:52:37 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 15:06:32 GMT]]></title><description><![CDATA[<p>Wenn der Compiler über die erste Zeile meckert, ist es nicht abwegig, dort mal zu schauen. Z.B. ob vielleicht ein Semikolon fehlt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257308</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257308</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 01 Apr 2007 15:06:32 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 15:11:47 GMT]]></title><description><![CDATA[<p>naja net direkt die erste zeile die erste wo er meckert ist diese hier</p>
<pre><code class="language-cpp">cout&lt;&lt;&quot;Jetzt liegen&quot;&lt;&lt;anzahlmuenzen&lt;&lt;&quot;Muenzen auf dem Tisch&quot;&lt;&lt;endl;
</code></pre>
<p>ich dachte mir könnte jemand helfen und sagen woran es liegt das ich das programm net starten kann ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257312</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Sun, 01 Apr 2007 15:11:47 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 15:15:24 GMT]]></title><description><![CDATA[<p>using namespace std;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257316</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257316</guid><dc:creator><![CDATA[dfsdfsdf]]></dc:creator><pubDate>Sun, 01 Apr 2007 15:15:24 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 15:18:36 GMT]]></title><description><![CDATA[<p>hab ich jetzt uach mit drinne, bringt aber nix, immernoch der selber fehler am selben punkt, und dann folgen ne menge andere fehler, obwohl ich diese nimmspiel von einer tut.seite habe?? komisch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257320</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257320</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Sun, 01 Apr 2007 15:18:36 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 15:28:22 GMT]]></title><description><![CDATA[<p>Fehlermeldung posten ftw</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257329</guid><dc:creator><![CDATA[darthdespotism]]></dc:creator><pubDate>Sun, 01 Apr 2007 15:28:22 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 15:36:57 GMT]]></title><description><![CDATA[<p>Firefighter schrieb:</p>
<blockquote>
<p>naja net direkt die erste zeile die erste wo er meckert ist diese hier</p>
<pre><code class="language-cpp">cout&lt;&lt;&quot;Jetzt liegen&quot;&lt;&lt;anzahlmuenzen&lt;&lt;&quot;Muenzen auf dem Tisch&quot;&lt;&lt;endl;
</code></pre>
</blockquote>
<p>Der Fehler liegt nicht unbedingt in der Zeile, in der der Compiler nicht mehr weiterkommt. Manchmal liegt der Fehler auch in der Zeile darüber. SeppSchrot hat dir übrigens schon längst gesagt, was das Problem ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257334</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 01 Apr 2007 15:36:57 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 15:59:31 GMT]]></title><description><![CDATA[<p>lol, der hat vol oft ein ; vergessen^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257352</guid><dc:creator><![CDATA[fdgfdgdf]]></dc:creator><pubDate>Sun, 01 Apr 2007 15:59:31 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 16:09:08 GMT]]></title><description><![CDATA[<blockquote>
<p>ich habe hier ma ein eigentlich simples Nimm-Spiel programmiert</p>
</blockquote>
<p>Ist das Programm wirklich von Dir?<br />
siehe: <a href="http://www.volkard.de/vcppkold/nimmspiel.html" rel="nofollow">http://www.volkard.de/vcppkold/nimmspiel.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257362</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257362</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Sun, 01 Apr 2007 16:09:08 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 18:13:18 GMT]]></title><description><![CDATA[<p>nein das habe ich doch oben shcon geschrieben, ich habe es wie gesagt von einer tutorial seite, daher wunderte ich mich das es net funktioniert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257545</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Sun, 01 Apr 2007 18:13:18 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Sun, 01 Apr 2007 18:41:11 GMT]]></title><description><![CDATA[<blockquote>
<p>nein das habe ich doch oben shcon geschrieben, ich habe es wie gesagt von einer tutorial seite, daher wunderte ich mich das es net funktioniert</p>
</blockquote>
<p>Jetzt hast Du dies geschrieben, dass Du es aus einem Tutorial übernommen hast. <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="😉"
    /> Der Autor ist Volkard Henkel. Du musst nur korrekt abtippen bzw. paste und copy durchführen. Dann klappt das auch mit dem Programm.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257568</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257568</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Sun, 01 Apr 2007 18:41:11 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Mon, 02 Apr 2007 06:18:54 GMT]]></title><description><![CDATA[<p>Leider nicht ganz. Das da ist volkards alter Kurs, in dem noch einige Fehler drin sind, wie z.B hier void main() statt int main(). Was man alles umändern soll im alten Kurs, damit auch dort alles funktioniert hat er <a href="http://www.volkard.de/Cpp/Tutorial/Grundlagen/Weiter_mit_dem_alten_Kurs/index.html" rel="nofollow">hier</a> geschrieben. Danach sollte es auch funktionnieren.</p>
<p>Ansonsten find ich den Kurs super.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1257734</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1257734</guid><dc:creator><![CDATA[Shinja]]></dc:creator><pubDate>Mon, 02 Apr 2007 06:18:54 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Wed, 04 Apr 2007 09:18:31 GMT]]></title><description><![CDATA[<p>Hi,<br />
hab hier auch ne eigentlich simple Aufgabe und wollte dafür nicht extra ein Topic aufmachen <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="😉"
    /><br />
Ach geh übrings erst in die 11.Klasse <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>
<pre><code class="language-cpp">//Aufgabe: ADD_Bruch.cpp
//von Joerg Jeschke

#include &lt;iostream.h&gt;
#include &lt;conio.h&gt;
//#include &lt;mymath.h&gt;       //für ggT  //der Compiler findet aber die Include-Datei scheinbar nicht, daher hab ich sie mal weggelassen

void kuerze (int&amp; zend, int&amp; nend);     
void ggt (int&amp; n1a); 

int main()
{
    int z1, z2, n1, n2, n1a, z1a, z2a, zend, nend;  
    char wahl;
    do
    {
    cout&lt;&lt;&quot; Bitte geben Sie den Zaehler des 1. Bruches ein: &quot;&lt;&lt;endl;
    cin&gt;&gt;z1;
    cout&lt;&lt;&quot; Bitte geben Sie den Nenner des 1. Bruches ein: &quot;&lt;&lt;endl;
    cin&gt;&gt;n1;
    cout&lt;&lt;&quot; Bitte geben Sie den Zaehler des 2. Bruches ein: &quot;&lt;&lt;endl;
    cin&gt;&gt;z2;
    cout&lt;&lt;&quot; Bitte geben Sie den Nenner des 2. Bruches ein: &quot;&lt;&lt;endl;
    cin&gt;&gt;n2;

    z1a=z1*n2;
    n1a=n1*n2;
    z2a=z2*n1;
    n2a=n2*n1;   

    zend=z1a+z2a;
    nend=n1a;
    cout&lt;&lt;&quot; Ungekuerzter Bruch: &quot;&lt;&lt;zend&lt;&lt;&quot; / &quot;&lt;&lt;nend&lt;&lt;endl;

     ggt(n1a);     
     kuerze (zend,  nend); 
     cout&lt;&lt;&quot; Wollen Sie das Programm wiederholen?&quot;&lt;&lt;endl;
     cin&gt;&gt;wahl;
     }
     while(wahl=='j' || wahl=='J');

getch();
}

          void ggt(int&amp; n1a) /
          {
              cout&lt;&lt;&quot; ggT ist: &quot;&lt;&lt;n1a&lt;&lt;endl;
              cout&lt;&lt;&quot; ggT ist: &quot;&lt;&lt;n1a&lt;&lt;endl;

          }

              void kuerze(int&amp; zend, int&amp; nend)   
              {
                  ggt(zend, nend); 

                  zend=zend/ggt;
                  nend=nend/ggt;

                  cout&lt;&lt;&quot; Ergebnis: &quot;&lt;&lt;zend&lt;&lt;&quot; / &quot;&lt;&lt;nend&lt;&lt;endl;
              }
</code></pre>
<p>Könnt ihr mir sagen was ich noch ändern muss?<br />
Ich weiß selber das das Programm umständlich geschrieben ist, aber nurso nebenbei ^^</p>
<p>danke schonmal für ne Antwort <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>gruß aSgaRd</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1259067</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1259067</guid><dc:creator><![CDATA[aSgaRd_89]]></dc:creator><pubDate>Wed, 04 Apr 2007 09:18:31 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Wed, 04 Apr 2007 09:36:38 GMT]]></title><description><![CDATA[<blockquote>
<p>C:\Dokumente und Einstellungen\bthomas\Desktop\C++\add_Bruch_geändert_2.cpp In function `void kuerze(int&amp;, int&amp;)':</p>
<p>46 C:\Dokumente und Einstellungen\bthomas\Desktop\C++\add_Bruch_geändert_2.cpp too many arguments to function `void ggt(int&amp;)'</p>
<p>57 C:\Dokumente und Einstellungen\bthomas\Desktop\C++\add_Bruch_geändert_2.cpp invalid operands of types `int' and `void ()(int&amp;)' to binary `operator/'</p>
<p>58 C:\Dokumente und Einstellungen\bthomas\Desktop\C++\add_Bruch_geändert_2.cpp invalid operands of types `int' and `void ()(int&amp;)' to binary `operator/'</p>
</blockquote>
<p>Das sind übrings die Fehlermeldungen ;)^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1259083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1259083</guid><dc:creator><![CDATA[aSgaRd_89]]></dc:creator><pubDate>Wed, 04 Apr 2007 09:36:38 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Wed, 04 Apr 2007 09:51:54 GMT]]></title><description><![CDATA[<p>Da fehlen aber noch einige Grundlagen. Du hast eine Funktion ggt(int&amp;) - die nimmt GENAU EIN Argument entgegen. In der Funktion kuerze() verwendest sie aber einmal mit zwei Argumenten (eine 2-Parameter-Variante existiert nicht) und einmal ohne Argument (das ergibt einen Funktionszeiger - und durch den darfst du nicht dividieren).</p>
<pre><code class="language-cpp">int ggt(int a,int b)
{
  ...//hier darfst du dich austoben
}

void kuerze(int &amp;a,int &amp;b)
{
  int teiler = ggt(a,b);
  a = a/teiler;
  b = b/teiler;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1259102</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1259102</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 04 Apr 2007 09:51:54 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei meinem Programm on Wed, 04 Apr 2007 10:05:05 GMT]]></title><description><![CDATA[<p>Ok, cool danke <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>Funzt jetzt einwandfrei....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1259110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1259110</guid><dc:creator><![CDATA[aSgaRd_89]]></dc:creator><pubDate>Wed, 04 Apr 2007 10:05:05 GMT</pubDate></item></channel></rss>