<?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[Frage zur Mehrfachvererbung (Diamand Problem)]]></title><description><![CDATA[<p>Folgende Konstellation:</p>
<pre><code class="language-cpp">class A{

 DATA....
};

class B1 : public virtual A{
protected: 
  void funk()
};

class B2: public virtual A{
protected: 
  void funk()
};

class C : public B1, B2{
private:

void Probem(){
  funk();   &lt;---- 
}
};
</code></pre>
<p>Welche funktion wird nun aufgerufen?? funk() von B1 ode B2??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/178531/frage-zur-mehrfachvererbung-diamand-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 22:49:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/178531.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Apr 2007 05:13:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage zur Mehrfachvererbung (Diamand Problem) on Thu, 12 Apr 2007 05:13:55 GMT]]></title><description><![CDATA[<p>Folgende Konstellation:</p>
<pre><code class="language-cpp">class A{

 DATA....
};

class B1 : public virtual A{
protected: 
  void funk()
};

class B2: public virtual A{
protected: 
  void funk()
};

class C : public B1, B2{
private:

void Probem(){
  funk();   &lt;---- 
}
};
</code></pre>
<p>Welche funktion wird nun aufgerufen?? funk() von B1 ode B2??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1264307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1264307</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 12 Apr 2007 05:13:55 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zur Mehrfachvererbung (Diamand Problem) on Thu, 12 Apr 2007 06:14:09 GMT]]></title><description><![CDATA[<p>Erstmal gar keine, weil der Compiler vor der selben Frage steht wie du (und der beantwortet diese Frage mit einer Fehlermeldung ala &quot;mehrdeutiger Aufruf&quot;). Das heißt du mußt explizit angeben, welche Funktion du haben willst - entweder 'B1::funk();' oder 'B2::funk();'.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1264323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1264323</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 12 Apr 2007 06:14:09 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zur Mehrfachvererbung (Diamand Problem) on Thu, 12 Apr 2007 06:29:34 GMT]]></title><description><![CDATA[<p>ok danke;) verstanden:)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1264330</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1264330</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 12 Apr 2007 06:29:34 GMT</pubDate></item></channel></rss>