<?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[Warum Struct?]]></title><description><![CDATA[<p>Hiho!<br />
Wenn ich Komplexe Datentypen verwende wie z.B. Name, Vorname, alter..., erstelle ich mir meist eine Klasse um die Daten in einem Typ zu vereinfachen. Allerdings verwenden die meisten Leute (u.a. die leutz von Microsoft) Structs dafür. Ist eine Klasse und Struct nicht das selbe, bloß das die Prioritäten von Public und Private vertauscht sind? Warum nehmen alle Structs für Datentypen, Zufall?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/125949/warum-struct</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 12:16:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/125949.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Nov 2005 17:23:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Warum Struct? on Thu, 10 Nov 2005 17:23:24 GMT]]></title><description><![CDATA[<p>Hiho!<br />
Wenn ich Komplexe Datentypen verwende wie z.B. Name, Vorname, alter..., erstelle ich mir meist eine Klasse um die Daten in einem Typ zu vereinfachen. Allerdings verwenden die meisten Leute (u.a. die leutz von Microsoft) Structs dafür. Ist eine Klasse und Struct nicht das selbe, bloß das die Prioritäten von Public und Private vertauscht sind? Warum nehmen alle Structs für Datentypen, Zufall?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/914154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/914154</guid><dc:creator><![CDATA[Perner]]></dc:creator><pubDate>Thu, 10 Nov 2005 17:23:24 GMT</pubDate></item><item><title><![CDATA[Reply to Warum Struct? on Thu, 10 Nov 2005 17:27:28 GMT]]></title><description><![CDATA[<p>Nun ja, unter C++ ist es in der Regel das selbe. Nur in C ist es anders, weil da können structs keine Methoden, statische Variablen usw. enthalten. Wenn dies nicht der Fall ist, dann nennt man das POD (plain old data, korrigiert mich, wenn ich falsch liege). Die verhält sich etwas anders als &quot;echte&quot; Klassen, zum Beispiel ist sie ganz normal Blockweise kopierbar und es gibt keinen Kopierkonstruktor usw.<br />
geloescht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/914156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/914156</guid><dc:creator><![CDATA[geloescht]]></dc:creator><pubDate>Thu, 10 Nov 2005 17:27:28 GMT</pubDate></item><item><title><![CDATA[Reply to Warum Struct? on Thu, 10 Nov 2005 18:23:35 GMT]]></title><description><![CDATA[<p>Structs reichen für &quot;einfache komplexe&quot; Datentypen aus. Man braucht ja nicht immer Funktionen.</p>
<p>zb.:</p>
<pre><code class="language-cpp">struct Color
{
    float r, g, b, a;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/914193</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/914193</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Thu, 10 Nov 2005 18:23:35 GMT</pubDate></item><item><title><![CDATA[Reply to Warum Struct? on Thu, 10 Nov 2005 18:52:43 GMT]]></title><description><![CDATA[<p>structs benutzt man häufig für Funktoren. (weil man sich damit eine zeile spart ;))</p>
]]></description><link>https://www.c-plusplus.net/forum/post/914218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/914218</guid><dc:creator><![CDATA[public]]></dc:creator><pubDate>Thu, 10 Nov 2005 18:52:43 GMT</pubDate></item></channel></rss>