<?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[Vererbung sinnvoll?]]></title><description><![CDATA[<p>Hi!<br />
ist folgende Vererbung sinnvoll?</p>
<p>Klasse View:</p>
<pre><code class="language-cpp">class View : public Widget
{
public:
  virtual void display() = 0;
};
</code></pre>
<p>Klasse GraphicWidget:</p>
<pre><code class="language-cpp">class GraphicWidget : public Widget
{
// (..)
};
</code></pre>
<p>Klasse GraphicView:</p>
<pre><code class="language-cpp">class GraphicView : public View, public: GraphicWidget
{
// (..)
};
</code></pre>
<p>Kann es zu Problemen kommen, da View von Widget erbt und GraphicView von View und GraphicWidget?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/193050/vererbung-sinnvoll</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 18:41:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/193050.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Sep 2007 11:47:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Vererbung sinnvoll? on Fri, 21 Sep 2007 11:47:24 GMT]]></title><description><![CDATA[<p>Hi!<br />
ist folgende Vererbung sinnvoll?</p>
<p>Klasse View:</p>
<pre><code class="language-cpp">class View : public Widget
{
public:
  virtual void display() = 0;
};
</code></pre>
<p>Klasse GraphicWidget:</p>
<pre><code class="language-cpp">class GraphicWidget : public Widget
{
// (..)
};
</code></pre>
<p>Klasse GraphicView:</p>
<pre><code class="language-cpp">class GraphicView : public View, public: GraphicWidget
{
// (..)
};
</code></pre>
<p>Kann es zu Problemen kommen, da View von Widget erbt und GraphicView von View und GraphicWidget?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370081</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370081</guid><dc:creator><![CDATA[Karl-Wolf]]></dc:creator><pubDate>Fri, 21 Sep 2007 11:47:24 GMT</pubDate></item><item><title><![CDATA[Reply to Vererbung sinnvoll? on Fri, 21 Sep 2007 11:51:14 GMT]]></title><description><![CDATA[<p>Welchen Sinn und Zweck hat GraphicWidget und View? Stell dir dir Frage, und du wirst ne andere Lösung finden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370084</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Fri, 21 Sep 2007 11:51:14 GMT</pubDate></item><item><title><![CDATA[Reply to Vererbung sinnvoll? on Fri, 21 Sep 2007 12:30:11 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Siehe auch <a href="http://en.wikipedia.org/wiki/Diamond_of_Death" rel="nofollow">Diamond of Death</a>.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370112</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370112</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 21 Sep 2007 12:30:11 GMT</pubDate></item><item><title><![CDATA[Reply to Vererbung sinnvoll? on Fri, 21 Sep 2007 15:55:04 GMT]]></title><description><![CDATA[<p>Karl-Wolf schrieb:</p>
<blockquote>
<p>Kann es zu Problemen kommen, da View von Widget erbt und GraphicView von View und GraphicWidget?</p>
</blockquote>
<p>Ja, kann es. Mehrfachvererbung kann je nach dem wie man sie einsetzt Probleme geben. Eine Lösung hierbei nennt sich abstrakte Basisklasse, und virtuelle Vererbung...</p>
<p>Siehe auch:<br />
<a href="http://www.parashift.com/c++-faq-lite/multiple-inheritance.html" rel="nofollow">http://www.parashift.com/c++-faq-lite/multiple-inheritance.html</a><br />
<a href="http://www.gotw.ca/gotw/" rel="nofollow">http://www.gotw.ca/gotw/</a> (Thema 37-39)</p>
<p>cu André</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370236</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Fri, 21 Sep 2007 15:55:04 GMT</pubDate></item><item><title><![CDATA[Reply to Vererbung sinnvoll? on Fri, 21 Sep 2007 18:06:27 GMT]]></title><description><![CDATA[<p>Danke. Ich habe mir mein Vorgehen nochmal genau überlegt und bin zum Entschluss gekommen, dass ich die View-Klasse nicht brauche.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370299</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370299</guid><dc:creator><![CDATA[Karl-Wolf]]></dc:creator><pubDate>Fri, 21 Sep 2007 18:06:27 GMT</pubDate></item></channel></rss>