<?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 fehlen mir die Rechte?]]></title><description><![CDATA[<p>Warum fehlen mir hier die Rechte, Allocation is doch verwand mit Node und Node *m_next is protected?<br />
Geht bitte nicht auf den Code ein ist eine Übung dich noch net fertig ist.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

class Node
{
    public:
    Node(const int &amp;save_=0,Node *next_=0);

    protected:
    int m_save;
    Node *m_next;
};

Node::Node(const int &amp;save_,Node *next_)
:m_save(save_),m_next(next_)
{

}

class Allocation : public Node
{
    public:
    Allocation();
    void push_back(const int &amp;value);

    private:
    Node m_head;
    Node *m_end;
};

Allocation::Allocation()
:m_end(&amp;m_head)
{

}

void Allocation::push_back(const int &amp;value)
{
    m_end-&gt;m_next=new Node(value);
}

int main()
{

    return 0;
}
</code></pre>
<blockquote>
<p>Compiling: C:\MinGW\Andi\ferien_projekt.cpp<br />
C:\MinGW\Andi\ferien_projekt.cpp: In member function <code>void Allocation::push\_back(const int&amp;)': C:\\MinGW\\Andi\\ferien\_projekt.cpp:11: error:</code>Node*Node::m_next' is protected<br />
C:\MinGW\Andi\ferien_projekt.cpp:39: error: within this context<br />
Process terminated with status 1 (0 minutes, 0 seconds)<br />
2 errors, 0 warnings</p>
</blockquote>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/196923/warum-fehlen-mir-die-rechte</link><generator>RSS for Node</generator><lastBuildDate>Wed, 30 Sep 2026 18:27:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/196923.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Nov 2007 15:58:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Warum fehlen mir die Rechte? on Sun, 04 Nov 2007 15:58:08 GMT]]></title><description><![CDATA[<p>Warum fehlen mir hier die Rechte, Allocation is doch verwand mit Node und Node *m_next is protected?<br />
Geht bitte nicht auf den Code ein ist eine Übung dich noch net fertig ist.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

class Node
{
    public:
    Node(const int &amp;save_=0,Node *next_=0);

    protected:
    int m_save;
    Node *m_next;
};

Node::Node(const int &amp;save_,Node *next_)
:m_save(save_),m_next(next_)
{

}

class Allocation : public Node
{
    public:
    Allocation();
    void push_back(const int &amp;value);

    private:
    Node m_head;
    Node *m_end;
};

Allocation::Allocation()
:m_end(&amp;m_head)
{

}

void Allocation::push_back(const int &amp;value)
{
    m_end-&gt;m_next=new Node(value);
}

int main()
{

    return 0;
}
</code></pre>
<blockquote>
<p>Compiling: C:\MinGW\Andi\ferien_projekt.cpp<br />
C:\MinGW\Andi\ferien_projekt.cpp: In member function <code>void Allocation::push\_back(const int&amp;)': C:\\MinGW\\Andi\\ferien\_projekt.cpp:11: error:</code>Node*Node::m_next' is protected<br />
C:\MinGW\Andi\ferien_projekt.cpp:39: error: within this context<br />
Process terminated with status 1 (0 minutes, 0 seconds)<br />
2 errors, 0 warnings</p>
</blockquote>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397559</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397559</guid><dc:creator><![CDATA[Stromberg]]></dc:creator><pubDate>Sun, 04 Nov 2007 15:58:08 GMT</pubDate></item><item><title><![CDATA[Reply to Warum fehlen mir die Rechte? on Sun, 04 Nov 2007 16:03:49 GMT]]></title><description><![CDATA[<blockquote>
<p>Allocation is doch verwand mit Node</p>
</blockquote>
<p>Warum ist Allocation ein Node? Das macht doch garkeinen Sinn.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397561</guid><dc:creator><![CDATA[Warum]]></dc:creator><pubDate>Sun, 04 Nov 2007 16:03:49 GMT</pubDate></item><item><title><![CDATA[Reply to Warum fehlen mir die Rechte? on Sun, 04 Nov 2007 16:50:10 GMT]]></title><description><![CDATA[<p>Stromberg schrieb:</p>
<blockquote>
<p>Geht bitte nicht auf den Code ein ist eine Übung dich noch net fertig ist.</p>
</blockquote>
<p>Ich wollte doch nur wissen warum ich kein Zugriff auf m_data habe!?</p>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397605</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397605</guid><dc:creator><![CDATA[Stromberg]]></dc:creator><pubDate>Sun, 04 Nov 2007 16:50:10 GMT</pubDate></item><item><title><![CDATA[Reply to Warum fehlen mir die Rechte? on Sun, 04 Nov 2007 17:19:20 GMT]]></title><description><![CDATA[<p>m_head und m_end und m_next sind unabhängige Objekte(bzw. Zeiger auf Objekte) der Klasse Node, d.h. es gilt auch für Allocation die von Node vorgegebene Schnittstelle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397624</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397624</guid><dc:creator><![CDATA[vic1986]]></dc:creator><pubDate>Sun, 04 Nov 2007 17:19:20 GMT</pubDate></item><item><title><![CDATA[Reply to Warum fehlen mir die Rechte? on Sun, 04 Nov 2007 17:26:50 GMT]]></title><description><![CDATA[<p>Ach so, das würde jetzt nur bei sowas gehen:<br />
Node a=new Allocation;<br />
???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397629</guid><dc:creator><![CDATA[Stromberg]]></dc:creator><pubDate>Sun, 04 Nov 2007 17:26:50 GMT</pubDate></item><item><title><![CDATA[Reply to Warum fehlen mir die Rechte? on Sun, 04 Nov 2007 17:49:51 GMT]]></title><description><![CDATA[<p>Hm, weiß jetzt leider nicht wie du das meinst. Wenn wir darüber reden, dass man in der Klasse Allocation z.B. m_end nicht als Zeiger auf Node sonder als Zeiger auf Allocation deklariert, dann ja, dann hättest du direkten Zugriff auf m_end-&gt;m_next.</p>
<p>Aber, auf m_end-&gt;m_next-&gt;m_next wieder nicht mehr, da m_next ja ein Zeiger auf Node ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397640</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397640</guid><dc:creator><![CDATA[vic1986]]></dc:creator><pubDate>Sun, 04 Nov 2007 17:49:51 GMT</pubDate></item></channel></rss>