<?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[verkettete Liste mit Cursor]]></title><description><![CDATA[<p>Hallo,</p>
<p>kennt von euch jemand ein Tutorial für eine Cursor-Verkettete-Liste oder kann mir zeigen, wie die funktioniert?</p>
<p>Ich hab hier mal als Beispiel eine einfach verkettete Liste geschrieben ... weiß aber nicht, wie ich eine cursor verkettete daraus machen kann ...</p>
<p>dekl.h</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio&gt;

class Kset
{
private:
        struct Knoten
        {
         Knoten *pNext;
         int Inhalt;
        };

        int Anzahl;
        Knoten* pFirst;

public:
        Kset();
        ~Kset();

        void insert_front(int obj);
        void display();
};

#include &quot;impl.hpp&quot;
</code></pre>
<p>impl.hpp</p>
<pre><code class="language-cpp">Kset::Kset()
{
 Anzahl = 0;
 pFirst = NULL;
}

Kset::~Kset()
{
 Knoten *pTemp = pFirst;
 for(; Anzahl&gt;0;)
    {
        pFirst = pFirst-&gt;pNext;
        delete pTemp;
        pTemp = pFirst;
        Anzahl--;
    }
}

void Kset::insert_front(int obj)
{
 if(Anzahl == 0)
    {
        pFirst = new Knoten;
        pFirst-&gt;Inhalt = obj;
        pFirst-&gt;pNext = NULL;
    }
 else
    {
        Knoten *pNew = new Knoten;
        pNew-&gt;Inhalt = obj;
        pNew-&gt;pNext = pFirst;
        pFirst = pNew;
    }
 Anzahl++;
}

void Kset::display()
{
 Knoten *pTemp = pFirst;
 while(pTemp != NULL)
    {
        cout&lt;&lt;pTemp-&gt;Inhalt&lt;&lt;&quot; &quot;;
        pTemp = pTemp-&gt;pNext;
    }
}
</code></pre>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &quot;dekl.h&quot;

#pragma hdrstop
#pragma argsused
int main(int argc, char* argv[])
{

        Kset k;

        k.insert_front(1);
        k.insert_front(2);
        k.display();

        getch();
        return 0;
}
</code></pre>
<p>bitte helft mir</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/150933/verkettete-liste-mit-cursor</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 21:42:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/150933.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Jun 2006 15:17:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to verkettete Liste mit Cursor on Wed, 21 Jun 2006 15:17:32 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>kennt von euch jemand ein Tutorial für eine Cursor-Verkettete-Liste oder kann mir zeigen, wie die funktioniert?</p>
<p>Ich hab hier mal als Beispiel eine einfach verkettete Liste geschrieben ... weiß aber nicht, wie ich eine cursor verkettete daraus machen kann ...</p>
<p>dekl.h</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio&gt;

class Kset
{
private:
        struct Knoten
        {
         Knoten *pNext;
         int Inhalt;
        };

        int Anzahl;
        Knoten* pFirst;

public:
        Kset();
        ~Kset();

        void insert_front(int obj);
        void display();
};

#include &quot;impl.hpp&quot;
</code></pre>
<p>impl.hpp</p>
<pre><code class="language-cpp">Kset::Kset()
{
 Anzahl = 0;
 pFirst = NULL;
}

Kset::~Kset()
{
 Knoten *pTemp = pFirst;
 for(; Anzahl&gt;0;)
    {
        pFirst = pFirst-&gt;pNext;
        delete pTemp;
        pTemp = pFirst;
        Anzahl--;
    }
}

void Kset::insert_front(int obj)
{
 if(Anzahl == 0)
    {
        pFirst = new Knoten;
        pFirst-&gt;Inhalt = obj;
        pFirst-&gt;pNext = NULL;
    }
 else
    {
        Knoten *pNew = new Knoten;
        pNew-&gt;Inhalt = obj;
        pNew-&gt;pNext = pFirst;
        pFirst = pNew;
    }
 Anzahl++;
}

void Kset::display()
{
 Knoten *pTemp = pFirst;
 while(pTemp != NULL)
    {
        cout&lt;&lt;pTemp-&gt;Inhalt&lt;&lt;&quot; &quot;;
        pTemp = pTemp-&gt;pNext;
    }
}
</code></pre>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &quot;dekl.h&quot;

#pragma hdrstop
#pragma argsused
int main(int argc, char* argv[])
{

        Kset k;

        k.insert_front(1);
        k.insert_front(2);
        k.display();

        getch();
        return 0;
}
</code></pre>
<p>bitte helft mir</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082187</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082187</guid><dc:creator><![CDATA[Mr. Blonde]]></dc:creator><pubDate>Wed, 21 Jun 2006 15:17:32 GMT</pubDate></item><item><title><![CDATA[Reply to verkettete Liste mit Cursor on Wed, 21 Jun 2006 15:47:20 GMT]]></title><description><![CDATA[<p>Mr. Blonde schrieb:</p>
<blockquote>
<p>... eine Cursor-Verkettete-Liste ...</p>
</blockquote>
<p>Hab ich ja noch nie gehört. Normalerweise benutzt man einen &quot;Cursor&quot; um über eine Liste zu laufen.<br />
Bist dir sicher, dass das nicht dass gleiche wie ne &quot;normale&quot; verkettete Liste ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082220</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082220</guid><dc:creator><![CDATA[DarthZiu]]></dc:creator><pubDate>Wed, 21 Jun 2006 15:47:20 GMT</pubDate></item><item><title><![CDATA[Reply to verkettete Liste mit Cursor on Wed, 21 Jun 2006 15:49:07 GMT]]></title><description><![CDATA[<p>das weiß ich ja nicht genau ... aus den infos die ich übers i-net gesammelt habe werde ich nicht wirklich schlau ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082221</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082221</guid><dc:creator><![CDATA[Mr. Blonde]]></dc:creator><pubDate>Wed, 21 Jun 2006 15:49:07 GMT</pubDate></item><item><title><![CDATA[Reply to verkettete Liste mit Cursor on Wed, 21 Jun 2006 15:51:33 GMT]]></title><description><![CDATA[<p>Hast die Aufgabe von deinem Lehrer/Prof? Dann einfach nochmal nachfragen - oder die Fragestellung mal hier posten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082225</guid><dc:creator><![CDATA[DarthZiu]]></dc:creator><pubDate>Wed, 21 Jun 2006 15:51:33 GMT</pubDate></item><item><title><![CDATA[Reply to verkettete Liste mit Cursor on Wed, 21 Jun 2006 16:04:35 GMT]]></title><description><![CDATA[<p>naja ... ist aus dem fach &quot;Datenstrukturen und Algorithmen&quot; ... ne konkrete Aufgabenstellung gibts nicht wirklich ...</p>
<p>es steht nur da ... programmieren sie eine cursorverkettete liste ... also eine Liste mit Cursor</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082233</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082233</guid><dc:creator><![CDATA[Mr. Blonde]]></dc:creator><pubDate>Wed, 21 Jun 2006 16:04:35 GMT</pubDate></item></channel></rss>