<?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[ganz einfaches Class- Programm]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
#include &lt;conio.h&gt;

using namespace std;

class Vollmilch

    {   private: double laenge;
                 double breite;
                 double hoehe;

        public: Vollmilch(double, double, double);
                void flaeche();
                void umfang();
    };

Vollmilch::Vollmilch(double l, double b, double h)
        { laenge = l;
          breite = b;
          hoehe = h;
        }

void Vollmilch::flaeche()
        { cout&lt;&lt;&quot;Der Flaecheninhalt Ihrer Vollmilch-Packung ist :\n&quot;&lt;&lt;laenge&lt;&lt;&quot; * &quot;&lt;&lt;breite&lt;&lt;&quot; * &quot;&lt;&lt;hoehe&lt;&lt;&quot; = &quot;&lt;&lt;laenge*breite&lt;&lt;endl;
        }

void Vollmilch::umfang()
        {cout&lt;&lt;&quot;Der Umfang Ihrer Vollmilch-Packung betraegt :\n 2 * &quot;&lt;&lt;laenge&lt;&lt;&quot; + 2 * &quot;&lt;&lt;breite&lt;&lt;&quot; + 2 * &quot;&lt;&lt;hoehe&lt;&lt;&quot; = &quot;&lt;&lt;2*laenge+2*breite+2*hoehe&lt;&lt;endl;
        }

main()
{

Vollmilch eins (5, 2, 15);
eins.flaeche();
eins.umfang();

getch();

}
</code></pre>
<p>Hallo Hallo!</p>
<p>Hab eigentlich nur die Frage...:</p>
<p>der Spuckt mir echt miese Ergebnisse aus!<br />
Wo liegt der Fehler?<br />
einklammern und so hat nur mehr Fehler gebracht xD</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/277270/ganz-einfaches-class-programm</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 01:43:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/277270.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Nov 2010 19:54:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 19:54:35 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
#include &lt;conio.h&gt;

using namespace std;

class Vollmilch

    {   private: double laenge;
                 double breite;
                 double hoehe;

        public: Vollmilch(double, double, double);
                void flaeche();
                void umfang();
    };

Vollmilch::Vollmilch(double l, double b, double h)
        { laenge = l;
          breite = b;
          hoehe = h;
        }

void Vollmilch::flaeche()
        { cout&lt;&lt;&quot;Der Flaecheninhalt Ihrer Vollmilch-Packung ist :\n&quot;&lt;&lt;laenge&lt;&lt;&quot; * &quot;&lt;&lt;breite&lt;&lt;&quot; * &quot;&lt;&lt;hoehe&lt;&lt;&quot; = &quot;&lt;&lt;laenge*breite&lt;&lt;endl;
        }

void Vollmilch::umfang()
        {cout&lt;&lt;&quot;Der Umfang Ihrer Vollmilch-Packung betraegt :\n 2 * &quot;&lt;&lt;laenge&lt;&lt;&quot; + 2 * &quot;&lt;&lt;breite&lt;&lt;&quot; + 2 * &quot;&lt;&lt;hoehe&lt;&lt;&quot; = &quot;&lt;&lt;2*laenge+2*breite+2*hoehe&lt;&lt;endl;
        }

main()
{

Vollmilch eins (5, 2, 15);
eins.flaeche();
eins.umfang();

getch();

}
</code></pre>
<p>Hallo Hallo!</p>
<p>Hab eigentlich nur die Frage...:</p>
<p>der Spuckt mir echt miese Ergebnisse aus!<br />
Wo liegt der Fehler?<br />
einklammern und so hat nur mehr Fehler gebracht xD</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980961</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980961</guid><dc:creator><![CDATA[lululu]]></dc:creator><pubDate>Mon, 15 Nov 2010 19:54:35 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:00:23 GMT]]></title><description><![CDATA[<p>ohne es ausprobiert zu haben:</p>
<pre><code class="language-cpp">cout&lt;&lt;&quot;Der Flaecheninhalt Ihrer Vollmilch-Packung ist :\n&quot;&lt;&lt;laenge&lt;&lt;&quot; * &quot;&lt;&lt;breite&lt;&lt;&quot; * &quot;&lt;&lt;hoehe&lt;&lt;&quot; = &quot;  :arrow_right: &lt;&lt;laenge*breite&lt;&lt;endl;  :warning:
</code></pre>
<p>und</p>
<pre><code class="language-cpp">// no
main()

// yes
int main()
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1980966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980966</guid><dc:creator><![CDATA[BasicMan01]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:00:23 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:00:30 GMT]]></title><description><![CDATA[<p>laenge<em>breite</em><strong>hoehe</strong></p>
<p>Berechnung anschauen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980967</guid><dc:creator><![CDATA[HighLigerBiMBam]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:00:30 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:03:15 GMT]]></title><description><![CDATA[<p>oh <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f623.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--persevering_face"
      title="&gt;.&lt;"
      alt="😣"
    /></p>
<p>danke...<br />
da hätte ich selbst drauf kommen können!</p>
<p>aber manchmal bin ich echt blind, was das anbelangt....</p>
<p>ne andere frage...<br />
wir haben in der schule gelernt</p>
<pre><code>main()
</code></pre>
<p>und nicht</p>
<pre><code>int main()
</code></pre>
<p>was hat das zu bedeuten? wer hat recht?<br />
warum wird es uns (falls es so ist) falsch beigebracht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980971</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980971</guid><dc:creator><![CDATA[lululu]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:03:15 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:07:00 GMT]]></title><description><![CDATA[<p>Was ist die Fläche von einem 3D-Objekt?<br />
Was ist der Umfang eines 3D-Objekts?<br />
Ich dachte, die drei Dinge hiessen Volumen, Oberfläche und Mantellänge.</p>
<p>Übrigens sollten die Funktionen einen Wert zurückgeben und nicht couten. Das soll lieber der Aufrufer erledigen.</p>
<p>lululu  schrieb:</p>
<blockquote>
<p>was hat das zu bedeuten? wer hat recht?<br />
warum wird es uns (falls es so ist) falsch beigebracht?</p>
</blockquote>
<p>- Das bedeutet eigentlich das gleiche (Rückgabetyp int)<br />
- Ich hab Recht (und BasicMan01 hier auch)<br />
- Euer Lehrer lebt hinter dem Mond und hat noch veraltete Dinge gelernt und seither nie nachgeschaut, ob sich was geändert hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980976</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980976</guid><dc:creator><![CDATA[flächenländer]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:07:00 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:08:06 GMT]]></title><description><![CDATA[<p>int main() ist zu bevorzugen nur main() ist falsch. Eine Funktion braucht immer einen Rückgabewert, auch wenn dieser void (nichts) ist z.B. void main()</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980978</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980978</guid><dc:creator><![CDATA[HighLigerBiMBam]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:08:06 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:11:41 GMT]]></title><description><![CDATA[<p>danke erstmal...<br />
ich hoffe ich krieg keinen minuspunkt wenn ich in der nächsten Klausur</p>
<pre><code>int main()
</code></pre>
<p>schreibe <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/1980980</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980980</guid><dc:creator><![CDATA[lululu]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:11:41 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:13:32 GMT]]></title><description><![CDATA[<p>HighLigerBiMBam schrieb:</p>
<blockquote>
<p>main() ist falsch. Eine Funktion braucht immer einen Rückgabewert, auch wenn dieser void (nichts) ist z.B. void main()</p>
</blockquote>
<p>void main ist falsch und sollte man vermeiden, aber ohne Funktionen ohne Rückgabewert sind implizit int (alte C-Regel) und g++ schluckt das, es ist aber vom aktuellen ISO C++ verboten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980981</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980981</guid><dc:creator><![CDATA[flächenländer]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:13:32 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:17:40 GMT]]></title><description><![CDATA[<p>Visual Studio schluckt das auch! Sicher ist void main() zu vermeiden, aber ich habe nichts anderes gesagt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980983</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980983</guid><dc:creator><![CDATA[HighLigerBiMBam]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:17:40 GMT</pubDate></item><item><title><![CDATA[Reply to ganz einfaches Class- Programm on Mon, 15 Nov 2010 20:18:37 GMT]]></title><description><![CDATA[<p>ich meinte das main ohne Rückgabewert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1980985</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1980985</guid><dc:creator><![CDATA[flächenländer]]></dc:creator><pubDate>Mon, 15 Nov 2010 20:18:37 GMT</pubDate></item></channel></rss>