<?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[gegenseitiger zugriff auf klassen]]></title><description><![CDATA[<pre><code class="language-cpp">class a;

class b{
   public:
   void DO(a x)
   { x.i++;}
};
class a{
    public:
    int i;
    void b(b a)
    { b.DO;}
};
</code></pre>
<p>gibt</p>
<pre><code>test.cc: In member function »void b::DO(a)«:
test.cc:5: Fehler: »x« has incomplete type
test.cc:1: Fehler: forward declaration of »struct a«
test.cc: At global scope:
test.cc:12: Fehler: Deklaration von »void a::b(b)«
test.cc:3: Fehler: verändert die Bedeutung von »b« von »class b«
test.cc: In member function »void a::b(b)«:
test.cc:12: Fehler: »((a*)this)-&gt;a::b« hat keinen Klassentyp
</code></pre>
<p>Hilfe wie geht das???</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192516/gegenseitiger-zugriff-auf-klassen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 11:08:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192516.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Sep 2007 13:03:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to gegenseitiger zugriff auf klassen on Sat, 15 Sep 2007 13:03:28 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">class a;

class b{
   public:
   void DO(a x)
   { x.i++;}
};
class a{
    public:
    int i;
    void b(b a)
    { b.DO;}
};
</code></pre>
<p>gibt</p>
<pre><code>test.cc: In member function »void b::DO(a)«:
test.cc:5: Fehler: »x« has incomplete type
test.cc:1: Fehler: forward declaration of »struct a«
test.cc: At global scope:
test.cc:12: Fehler: Deklaration von »void a::b(b)«
test.cc:3: Fehler: verändert die Bedeutung von »b« von »class b«
test.cc: In member function »void a::b(b)«:
test.cc:12: Fehler: »((a*)this)-&gt;a::b« hat keinen Klassentyp
</code></pre>
<p>Hilfe wie geht das???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1365858</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1365858</guid><dc:creator><![CDATA[HILFE!!]]></dc:creator><pubDate>Sat, 15 Sep 2007 13:03:28 GMT</pubDate></item><item><title><![CDATA[Reply to gegenseitiger zugriff auf klassen on Sat, 15 Sep 2007 13:16:51 GMT]]></title><description><![CDATA[<p>Der Typ eines Parameters einer Funktion muss bei der Deklaration dieser Funktion nicht vollständig sein, wohl aber bei deren Definition (oder beim Aufruf derselben).<br />
=&gt;<br />
Definiere die Funktionen nach der Definition von class a und class b.</p>
<pre><code class="language-cpp">class a;

class b{
   public:
   void DO(a x);
};
class a{
    public:
    int i;
    void b(b a);
};
void b::DO(a x)
{ x.i++;}
void a::b(b a)
{ b.DO();}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1365862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1365862</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Sat, 15 Sep 2007 13:16:51 GMT</pubDate></item><item><title><![CDATA[Reply to gegenseitiger zugriff auf klassen on Sat, 15 Sep 2007 13:15:29 GMT]]></title><description><![CDATA[<p>Ok hätte ich mir denken können <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>DANKE</p>
<p>jetzt weiß ich mehr</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1365864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1365864</guid><dc:creator><![CDATA[danke]]></dc:creator><pubDate>Sat, 15 Sep 2007 13:15:29 GMT</pubDate></item></channel></rss>