<?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[Einfach Verkettete Liste in Funktion Ausgeben]]></title><description><![CDATA[<p>Gute Tag,</p>
<p>vielleicht kann mir jemand bei meinem Problem helfen.<br />
Undzwar will ich mir eine Einfach Verkettete Liste in einer Funktion ausgeben lassen.<br />
Also der Bereich im Quellcode der Auskommentiert wurde, soll mit hilfe einer Funktion ausgegeben werden. Ich hoffe ihr könnt mir weiterhelfen.</p>
<pre><code>#include&lt;iostream&gt;
#include&lt;stdlib.h&gt;
#include&lt;time.h&gt;

using namespace std;

struct List{
  int wert;
  struct List *next;
};

void Erstellen(struct List) {

srand(time(0));

struct List *start = new struct List;
struct List *current = start;

current-&gt;next=NULL;

int anz=0;

int x=rand();

cout &lt;&lt; &quot; Wie viele Werte sollen Erstellt werden?\nAnzahl =  &quot;;

cin &gt;&gt; anz;

for(int i=0;i&lt;=anz;i++){

  x=rand() % 1000;
  current-&gt;wert=x;
  current-&gt;next=new List;
  current=current-&gt;next;
}

current=start;

/*while(current-&gt;next) {

  cout &lt;&lt; &quot; Ihre random Werte = &quot; &lt;&lt; current-&gt;wert &lt;&lt; endl;
  current=current-&gt;next;
}*/

}

int main () {

  List a;

  Erstellen(a);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/317244/einfach-verkettete-liste-in-funktion-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Jul 2026 11:26:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/317244.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Jun 2013 11:39:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Einfach Verkettete Liste in Funktion Ausgeben on Sat, 01 Jun 2013 11:39:43 GMT]]></title><description><![CDATA[<p>Gute Tag,</p>
<p>vielleicht kann mir jemand bei meinem Problem helfen.<br />
Undzwar will ich mir eine Einfach Verkettete Liste in einer Funktion ausgeben lassen.<br />
Also der Bereich im Quellcode der Auskommentiert wurde, soll mit hilfe einer Funktion ausgegeben werden. Ich hoffe ihr könnt mir weiterhelfen.</p>
<pre><code>#include&lt;iostream&gt;
#include&lt;stdlib.h&gt;
#include&lt;time.h&gt;

using namespace std;

struct List{
  int wert;
  struct List *next;
};

void Erstellen(struct List) {

srand(time(0));

struct List *start = new struct List;
struct List *current = start;

current-&gt;next=NULL;

int anz=0;

int x=rand();

cout &lt;&lt; &quot; Wie viele Werte sollen Erstellt werden?\nAnzahl =  &quot;;

cin &gt;&gt; anz;

for(int i=0;i&lt;=anz;i++){

  x=rand() % 1000;
  current-&gt;wert=x;
  current-&gt;next=new List;
  current=current-&gt;next;
}

current=start;

/*while(current-&gt;next) {

  cout &lt;&lt; &quot; Ihre random Werte = &quot; &lt;&lt; current-&gt;wert &lt;&lt; endl;
  current=current-&gt;next;
}*/

}

int main () {

  List a;

  Erstellen(a);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2327767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2327767</guid><dc:creator><![CDATA[KFF7]]></dc:creator><pubDate>Sat, 01 Jun 2013 11:39:43 GMT</pubDate></item><item><title><![CDATA[Reply to Einfach Verkettete Liste in Funktion Ausgeben on Sat, 01 Jun 2013 12:30:10 GMT]]></title><description><![CDATA[<pre><code>#include&lt;iostream&gt;
#include&lt;stdlib.h&gt;
#include&lt;time.h&gt;

using namespace std;

struct List{
  int wert;
  struct List *next;
};

void Erstellen(struct List) {

srand(time(0));

struct List *start = new struct List;
struct List *current = start;

current-&gt;next=NULL;

int anz=0;

int x=rand();

cout &lt;&lt; &quot; Wie viele Werte sollen Erstellt werden?\nAnzahl =  &quot;;

cin &gt;&gt; anz;

for(int i=0;i&lt;=anz;i++){

  x=rand() % 1000;
  current-&gt;wert=x;
  current-&gt;next=new List;
  current=current-&gt;next;
}
current-&gt;next=NULL;

current=start;

while(current-&gt;next) {

  cout &lt;&lt; &quot; Ihre random Werte = &quot; &lt;&lt; current-&gt;wert &lt;&lt; endl;
  current=current-&gt;next;
}

}

int main () {

  List a;

  Erstellen(a);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2327778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2327778</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sat, 01 Jun 2013 12:30:10 GMT</pubDate></item><item><title><![CDATA[Reply to Einfach Verkettete Liste in Funktion Ausgeben on Sat, 01 Jun 2013 12:42:11 GMT]]></title><description><![CDATA[<p>Ich vermute er soll die Erstellen-Funktion in Erstellen und Ausgeben teilen und aus der main() aufrufen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Warum zeigst du keinen Versuch einer Lösung?<br />
Auskommentieren zählt da nicht. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
&quot;Zeigerübergaben&quot; aus und in Funktionen noch mal nachsehen?</p>
<p>Wenn das eine C++ Übung werden soll, warum dann noch C-Header und keine C++ Header?</p>
<p>Zeile 31 zählt nicht ganz wie gewünscht, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2327782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2327782</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Sat, 01 Jun 2013 12:42:11 GMT</pubDate></item><item><title><![CDATA[Reply to Einfach Verkettete Liste in Funktion Ausgeben on Sun, 02 Jun 2013 07:33:39 GMT]]></title><description><![CDATA[<p>KFF7 schrieb:</p>
<blockquote>
<p>vielleicht kann mir jemand bei meinem Problem helfen.<br />
Undzwar will ich mir eine Einfach Verkettete Liste in einer Funktion ausgeben lassen.</p>
</blockquote>
<p>Erzähl doch mal, wo da die Probleme genau liegen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2327935</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2327935</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sun, 02 Jun 2013 07:33:39 GMT</pubDate></item></channel></rss>