<?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 ggT]]></title><description><![CDATA[<p>Habe das Problem das mir cout als nicht deklariert angezeigt wird. Weis nicht wo der fehler ist.<br />
danke euch schon im Voraus</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
#include &lt;math.h&gt;</p>
<p>using namespace std;</p>
<p>int main(int argc, char *argv[])</p>
<p>{</p>
<p>int ggT( int a , int b);<br />
int a , b ;</p>
<p>printf (&quot;Gib einen beliebigen Integer ein :\n&quot;);<br />
scanf (&quot;%d&quot;,&amp; a);</p>
<p>printf (&quot;Gib den zweiten beliebigen Integer ein:\n&quot;);<br />
scanf (&quot;%d&quot;,&amp; b);</p>
<p>int ggt = ggT(b, a%b);<br />
cout&lt;&lt; &quot;ggT von &quot; &lt;&lt; a &lt;&lt; &quot; und &quot; &lt;&lt; b &lt;&lt; &quot; ist &quot; &lt;&lt; ggt &lt;&lt; endl;<br />
return 0;</p>
<p>}</p>
<p>int ggT(int a, int b) {<br />
if( b==0)<br />
return a;<br />
else<br />
ggT(b, a%b);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/292046/hilfe-bei-ggt</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 08:18:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/292046.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Sep 2011 16:53:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe bei ggT on Thu, 01 Sep 2011 16:53:08 GMT]]></title><description><![CDATA[<p>Habe das Problem das mir cout als nicht deklariert angezeigt wird. Weis nicht wo der fehler ist.<br />
danke euch schon im Voraus</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
#include &lt;math.h&gt;</p>
<p>using namespace std;</p>
<p>int main(int argc, char *argv[])</p>
<p>{</p>
<p>int ggT( int a , int b);<br />
int a , b ;</p>
<p>printf (&quot;Gib einen beliebigen Integer ein :\n&quot;);<br />
scanf (&quot;%d&quot;,&amp; a);</p>
<p>printf (&quot;Gib den zweiten beliebigen Integer ein:\n&quot;);<br />
scanf (&quot;%d&quot;,&amp; b);</p>
<p>int ggt = ggT(b, a%b);<br />
cout&lt;&lt; &quot;ggT von &quot; &lt;&lt; a &lt;&lt; &quot; und &quot; &lt;&lt; b &lt;&lt; &quot; ist &quot; &lt;&lt; ggt &lt;&lt; endl;<br />
return 0;</p>
<p>}</p>
<p>int ggT(int a, int b) {<br />
if( b==0)<br />
return a;<br />
else<br />
ggT(b, a%b);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2113523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2113523</guid><dc:creator><![CDATA[Dobreski]]></dc:creator><pubDate>Thu, 01 Sep 2011 16:53:08 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei ggT on Thu, 01 Sep 2011 17:11:54 GMT]]></title><description><![CDATA[<p>1. Lerne C++ an Hand eines Buches (z.B. C++-Primer oder Die C++-Porgrammiersprache, NICHT JEDOCH C++ von A bis Z!)</p>
<p>2. Dein Programm hat definitiv nicht nur den einen Fehler...<br />
Hier mal eine korrigierte Form:</p>
<pre><code class="language-cpp">// Weg damit, das ist C!
// #include &lt;stdio.h&gt;
// #include &lt;stdlib.h&gt;
// #include &lt;math.h&gt;

// Hier drin ist std::cout, also muss das eingebunden werden
// std::cin ist hier auch gleich drin (als Ersatz zu scanf)
#include &lt;iostream&gt;

// muss man nicht machen, aber so kann man einfach cout, cin und endl schreiben
// anstatt std::cout usw.
using namespace std;

// Die Deklaration von ggT packen wir nicht in die main-Funktion
int ggT(int a, int b);

int main(int argc, char *argv[])
{
    int a, b;

    // printf und scanf sind C-Funktionen!
    // also ersetzen wir deine Funktionen durch std::cout und std::cin
    cout &lt;&lt; &quot;Gib einen beliebigen Integer ein: &quot;;
    cin &gt;&gt; a;

    cout &lt;&lt; &quot;Gib den zweiten beliebigen Integer ein: &quot;; 
    cin &gt;&gt; b;

    // Keine gute Idee, eine Variable fast genauso zu nennen wie eine Funktion
    // Stell dir vor, du vertippst dich mal... (aber prinzipiell ist das kein Fehler)
    int ggt = ggT(a, b);
    cout&lt;&lt; &quot;ggT von &quot; &lt;&lt; a &lt;&lt; &quot; und &quot; &lt;&lt; b &lt;&lt; &quot; ist &quot; &lt;&lt; ggt &lt;&lt; endl;
    return 0;
}

int ggT(int a, int b)
{
    if(b == 0)
        return a;
    else
        return ggT(b, a % b); // Hier hattest du das return vergessen
}
</code></pre>
<p>MfG DrakoXP</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2113525</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2113525</guid><dc:creator><![CDATA[DrakoXP]]></dc:creator><pubDate>Thu, 01 Sep 2011 17:11:54 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei ggT on Thu, 01 Sep 2011 17:54:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/10459">@DrakoXP</a></p>
<p>Gehört hier jezt nicht zwar zum Thema hinein, aber eine kurze Frage hätte ich.<br />
Ist &quot;C++ von A bis Z&quot; wirklich so schlecht? Ich meine als Einstieg, weil das erlernen dieser Sprache ist mit einem einzigen Buch definitiv nicht getan, aber diese Aussage verunsichert mich ein wenig.</p>
<p>Naja und &quot;C++ PRIMER&quot; (Vierte Auflage) habe ich im Regal stehen, aber habe seit einer kurzen Weile mit &quot;C++ von A bis Z&quot; angefangen.</p>
<p>Gruss,<br />
arb3r</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2113543</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2113543</guid><dc:creator><![CDATA[arb3r]]></dc:creator><pubDate>Thu, 01 Sep 2011 17:54:14 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei ggT on Thu, 01 Sep 2011 17:55:34 GMT]]></title><description><![CDATA[<p>arb3r schrieb:</p>
<blockquote>
<p>Gehört hier jezt nicht zwar zum Thema hinein, aber eine kurze Frage hätte ich.<br />
Ist &quot;C++ von A bis Z&quot; wirklich so schlecht?</p>
</blockquote>
<p>Es gibt mehrere(!) Threads dazu, die vor diesem Buch warnen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2113545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2113545</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Thu, 01 Sep 2011 17:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei ggT on Thu, 01 Sep 2011 18:03:04 GMT]]></title><description><![CDATA[<p>otze schrieb:</p>
<blockquote>
<p>Es gibt mehrere(!) Threads dazu, die vor diesem Buch warnen.</p>
</blockquote>
<p>Zu finden unter google<br />
c++ wurstbrot supermarkt<br />
und<br />
c++ jürgen würgen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2113549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2113549</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Thu, 01 Sep 2011 18:03:04 GMT</pubDate></item></channel></rss>