<?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[Zugriff auf Klasse schlägt fehl]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe eine verkettete Liste geschrieben und diese wird auch korrekt compiliert. Allerdings kriege ich sie nicht aufgerufen...</p>
<pre><code class="language-cpp">Eintrag* mylist = new Eintrag(1548754, true, 5004, &quot;26.07.2006&quot;);
Liste* test = new Liste();
test-&gt;anhaengen(mylist);
</code></pre>
<p>Das gibt diesen Fehler:</p>
<pre><code>c:\TMP\inventur\inventurDlg.cpp(512) : error C2664: 'Liste::anhaengen' : cannot convert parameter 1 from 'Eintrag *' to 'Eintrag'
        No constructor could take the source type, or constructor overload resolution was ambiguous
</code></pre>
<p>Daraufhin hab ichs mal ohne die Sternchen probiert, weil ich net genau weiß, wozu die da sind, klappt aber auch net.</p>
<p>Wäre cool wenn mir jemand helfen könnte...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/154312/zugriff-auf-klasse-schlägt-fehl</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 13:39:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/154312.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Jul 2006 09:14:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zugriff auf Klasse schlägt fehl on Wed, 26 Jul 2006 09:14:05 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe eine verkettete Liste geschrieben und diese wird auch korrekt compiliert. Allerdings kriege ich sie nicht aufgerufen...</p>
<pre><code class="language-cpp">Eintrag* mylist = new Eintrag(1548754, true, 5004, &quot;26.07.2006&quot;);
Liste* test = new Liste();
test-&gt;anhaengen(mylist);
</code></pre>
<p>Das gibt diesen Fehler:</p>
<pre><code>c:\TMP\inventur\inventurDlg.cpp(512) : error C2664: 'Liste::anhaengen' : cannot convert parameter 1 from 'Eintrag *' to 'Eintrag'
        No constructor could take the source type, or constructor overload resolution was ambiguous
</code></pre>
<p>Daraufhin hab ichs mal ohne die Sternchen probiert, weil ich net genau weiß, wozu die da sind, klappt aber auch net.</p>
<p>Wäre cool wenn mir jemand helfen könnte...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104382</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104382</guid><dc:creator><![CDATA[Pegasus]]></dc:creator><pubDate>Wed, 26 Jul 2006 09:14:05 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf Klasse schlägt fehl on Wed, 26 Jul 2006 09:34:42 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">test-&gt;anhaengen(*mylist);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1104404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104404</guid><dc:creator><![CDATA[connan]]></dc:creator><pubDate>Wed, 26 Jul 2006 09:34:42 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf Klasse schlägt fehl on Wed, 26 Jul 2006 10:53:34 GMT]]></title><description><![CDATA[<p>OK, funktioniert wunderbar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Die Liste funktioniert auch. Allerdings möchte ich jetzt von verschiedenen Methoden aus auf die Liste zugreifen, die ich erstellt habe.<br />
Kann mir jemande sagen wie das geht?</p>
<p>Wenn ich einfach nur den Namen der Liste eingebe, geht es nicht.</p>
<p>Beispiel: In einer Methode steht:</p>
<pre><code class="language-cpp">Liste* test = new Liste();
</code></pre>
<p>Dann kann ich nicht von einer anderen Methode darauf zufreifen mit z.B.:</p>
<pre><code class="language-cpp">test-&gt;ausgeben();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1104465</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104465</guid><dc:creator><![CDATA[Pegasus]]></dc:creator><pubDate>Wed, 26 Jul 2006 10:53:34 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf Klasse schlägt fehl on Wed, 26 Jul 2006 11:28:25 GMT]]></title><description><![CDATA[<p>Schon probiert die Liste als Member-Variable anzugeben?</p>
<p>Ich hab VS.NET2003 Englisch, da musst du nur, mit der rechten Maustaste, auf die Klasse klicken und &quot;Add Variable&quot; wählen.</p>
<p>Oder du übergibst deine Liste als Parameter an eine andere Methode.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104499</guid><dc:creator><![CDATA[MP]]></dc:creator><pubDate>Wed, 26 Jul 2006 11:28:25 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf Klasse schlägt fehl on Wed, 26 Jul 2006 12:18:26 GMT]]></title><description><![CDATA[<p>Hm, also das mit &quot;Add Variable&quot; funzt net, aber ich werde es wohl mit dem Übergabewert machen.</p>
<p>Aber irgendwie kriege ich das net hin. Kann mir jemand erklären wie man das mit der Übergabe eines Objektes (hier: Liste) macht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104549</guid><dc:creator><![CDATA[Pegasus]]></dc:creator><pubDate>Wed, 26 Jul 2006 12:18:26 GMT</pubDate></item></channel></rss>