<?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[64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function)]]></title><description><![CDATA[<p>Erstmal guten Tag.</p>
<p>Ich lerne gerade C++ und bin grade die Vererbung am durchnehmen</p>
<p><a href="http://pastebin.com/m6c076a04" rel="nofollow">http://pastebin.com/m6c076a04</a></p>
<p>Diesen Code habe ich geschrieben, allerdings erhalte ich folgenden Fehler:<br />
64 C:\Dev-Cpp\lernen\vererbung.cpp `Otto' undeclared (first use this function)</p>
<p>Es scheint an der oberen If Abfrage zu liegen (ob unfaierer oder normaler automat), erst in der if struktur wird &quot;otto&quot; erstellt.<br />
Der Compiler denkt wohl das Objekt exisitere nicht.</p>
<p>Was nun?<br />
Ich kann ja das Objekt schlecht 2 mal definieren...</p>
<p>Über Antworten würde ich mich freuen <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>mfg, root</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/223687/64-c-dev-cpp-lernen-vererbung-cpp-otto-undeclared-first-use-this-function</link><generator>RSS for Node</generator><lastBuildDate>Sat, 03 Oct 2026 19:18:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/223687.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Sep 2008 15:28:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 15:28:21 GMT]]></title><description><![CDATA[<p>Erstmal guten Tag.</p>
<p>Ich lerne gerade C++ und bin grade die Vererbung am durchnehmen</p>
<p><a href="http://pastebin.com/m6c076a04" rel="nofollow">http://pastebin.com/m6c076a04</a></p>
<p>Diesen Code habe ich geschrieben, allerdings erhalte ich folgenden Fehler:<br />
64 C:\Dev-Cpp\lernen\vererbung.cpp `Otto' undeclared (first use this function)</p>
<p>Es scheint an der oberen If Abfrage zu liegen (ob unfaierer oder normaler automat), erst in der if struktur wird &quot;otto&quot; erstellt.<br />
Der Compiler denkt wohl das Objekt exisitere nicht.</p>
<p>Was nun?<br />
Ich kann ja das Objekt schlecht 2 mal definieren...</p>
<p>Über Antworten würde ich mich freuen <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>mfg, root</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590349</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 15:28:21 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 15:31:57 GMT]]></title><description><![CDATA[<p><a href="http://tutorial.schornboeck.net/scope.htm" rel="nofollow">http://tutorial.schornboeck.net/scope.htm</a></p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590353</guid><dc:creator><![CDATA[ceplusplus*loggedoff]]></dc:creator><pubDate>Mon, 29 Sep 2008 15:31:57 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 15:34:21 GMT]]></title><description><![CDATA[<p>ceplusplus@loggedoff schrieb:</p>
<blockquote>
<p><a href="http://tutorial.schornboeck.net/scope.htm" rel="nofollow">http://tutorial.schornboeck.net/scope.htm</a></p>
<p>MfG</p>
</blockquote>
<p>Wie oben gesagt das weiß ich ja selber. Die Frage ist wie mach ich das jetzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590354</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 15:34:21 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 15:43:43 GMT]]></title><description><![CDATA[<p>evtl. so (als Grundgerüst). Natürlich das löschen, Test auf Nullpointer etc. nicht vergessen.<br />
Bitte ersetz auch das goto durch eine Schleife.</p>
<pre><code class="language-cpp">ColaAutomat* Otto(0);
if(colatype==1)
{
   preis = 50;
   Sleep(3000);
   Otto = new ColaAutomat;
}
else if(colatype==2)
{
   preis = 500;
   Sleep(3000);
   Otto = new UeberteuerterColaAutomat;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1590359</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590359</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 29 Sep 2008 15:43:43 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 15:46:18 GMT]]></title><description><![CDATA[<p>gleicher fehler</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590361</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 15:46:18 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 15:57:33 GMT]]></title><description><![CDATA[<p>Dann zeig bitte mal deinen jetzigen Code.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590367</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 29 Sep 2008 15:57:33 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 16:02:00 GMT]]></title><description><![CDATA[<p><a href="http://pastebin.com/d445175ea" rel="nofollow">http://pastebin.com/d445175ea</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590373</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 16:02:00 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 16:12:04 GMT]]></title><description><![CDATA[<p>Das kann eigentlich nicht mehr der gleiche Fehler sein.<br />
Der Zugriff auf die Memberfunktionen muß jetzt natürlich anders sein. Immerhin ist Otto jetzt ein Zeiger.</p>
<pre><code class="language-cpp">geld = Otto-&gt;zeigegeld();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1590384</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590384</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 29 Sep 2008 16:12:04 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 16:13:30 GMT]]></title><description><![CDATA[<p>Funktioniert!</p>
<p>Danke dir!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590385</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590385</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 16:13:30 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 16:14:38 GMT]]></title><description><![CDATA[<p><strong>delete nicht vergessen</strong></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590388</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 29 Sep 2008 16:14:38 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 16:16:52 GMT]]></title><description><![CDATA[<p>wtf is delete? xD</p>
<p>wie gesagt ich lerns grade erst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590392</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 16:16:52 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 16:18:08 GMT]]></title><description><![CDATA[<p><a href="http://tutorial.schornboeck.net/dyn_speicher.htm" rel="nofollow">http://tutorial.schornboeck.net/dyn_speicher.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590395</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 29 Sep 2008 16:18:08 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 16:26:46 GMT]]></title><description><![CDATA[<p>ok jetzt ist der code so:</p>
<p><a href="http://pastebin.com/d763df4d7" rel="nofollow">http://pastebin.com/d763df4d7</a></p>
<p>allerdings scheint da was nich ganz zu funktionieren...</p>
<p>Es wird nämlich immer die funktion für den normalen Automaten aufgerufen, nicht für den unfairen...</p>
<p>Beispiel:<br />
Mann wählt den unfairen automaten, wirft 100 ein.<br />
Dann sollte eigentlich angezeigt werden, dass 50 eingeworden wurden, aber es wird angezeit, dass 100 eingeworfen wurden (also die normale methode).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590398</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 16:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 17:18:37 GMT]]></title><description><![CDATA[<p>schau mal hier<br />
<a href="http://tutorial.schornboeck.net/virtual.htm" rel="nofollow">http://tutorial.schornboeck.net/virtual.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590423</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590423</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 29 Sep 2008 17:18:37 GMT</pubDate></item><item><title><![CDATA[Reply to 64 C:&#x5C;Dev-Cpp&#x5C;lernen&#x5C;vererbung.cpp &#96;Otto&#x27; undeclared (first use this function) on Mon, 29 Sep 2008 17:10:21 GMT]]></title><description><![CDATA[<p>Endlich! Es geht!</p>
<p>Vielen Dank für deine Mühe!</p>
<p>Hier noch der fertig Source:<br />
<a href="http://pastebin.com/m5dfe6d5f" rel="nofollow">http://pastebin.com/m5dfe6d5f</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1590432</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1590432</guid><dc:creator><![CDATA[root.]]></dc:creator><pubDate>Mon, 29 Sep 2008 17:10:21 GMT</pubDate></item></channel></rss>