<?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[error Code C2227 Hilfe für Verständnis und Behebung des Fehlers]]></title><description><![CDATA[<p>Hallo Zusammen,<br />
ich benötige bisschen Hilfe bei dem oben angegebenen Fehlercode. Verstehe nicht genau was ich falsch mache. <code>Links von &quot;-&gt;getSignature&quot; muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.</code> . Ich verstehe wohl irgendwie die Fehlerbezeichnung nicht. Einen Pointer vom Typ medium hab ich ja mit der Variable tmp und den Fülle ich ja dann mit</p>
<pre><code>tmp = new Medium();
</code></pre>
<p>Hier ist der betroffene Codeteil:</p>
<pre><code>int main(){
	MyContainer *container = new MyContainer;
	Medium *tmp = NULL;
	bool abort = false;

	int indexMedien = 0;
	Medium* medium[N];
	/*int indexBook = 0;
	Book* book[N];
	int indexMovie = 0;
	Movie* movie[N];
	*/

	getMenuText();
	char instruction = '0';//auswahl
	while (instruction != 'q'){
		cout &lt;&lt; endl &lt;&lt; &quot;Was wollen Sie tun?&quot; &lt;&lt; endl;
		cout &lt;&lt; &quot;-&gt;&quot;;
		cin &gt;&gt; instruction;
		cout &lt;&lt; endl;
		switch (instruction)
		{
		case 'm':	//erstellen eines neuen Medium		
			tmp = new Medium;

			abort = false;
			for (container-&gt;begin(); ((container-&gt;getItem() != NULL)||abort == true); container-&gt;next()){
			//cout &lt;&lt; &amp;tmp-&gt;getSignature;
				if (tmp-&gt;getSignature == container-&gt;getItem-&gt;getSignature){
					abort = true;
					cout &lt;&lt; &quot;Fehlermeldung: Hinzufügen eines neuen Elementes hat leider nicht geklappt&quot; &lt;&lt; endl;

				}
			}
			//container-&gt;add(tmp);
			break;
		/*case 'b':	//erstellen eines neuen Buches			
			if (indexBook &lt; N){
				book[indexBook] = new Book();
				indexBook++;
				break;
			}
			cout &lt;&lt; &quot;Speicher voll&quot;; break;
		case 'v':	//erstellen eines neuen Movies			
			if (indexMovie &lt; N){
				movie[indexMovie] = new Movie();
				indexMovie++;
				break;
			}
			cout &lt;&lt; &quot;Speicher voll&quot;; break;
			*/
		case 'l':
</code></pre>
<p>Und diese Zeile gefällt ihm nicht, bzw der Pointer tmp:</p>
<pre><code>if (tmp-&gt;getSignature == container-&gt;getItem-&gt;getSignature){
</code></pre>
<p>Das Programm ist eine Übungsaufgabe zu Implementierung eines Containers, und der Container beinhaltet Knoten mit einem next Pointer und dem Element(in dem beispiel jetzt eben das Medium).<br />
Hoffe um Hilfe, da ich wegen dem Fehler nicht mehr weiterkomme,bzw mit die Überprüfung fehlt.<br />
Danke im Voraus <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>
]]></description><link>https://www.c-plusplus.net/forum/topic/326038/error-code-c2227-hilfe-für-verständnis-und-behebung-des-fehlers</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 16:18:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/326038.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 May 2014 10:10:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to error Code C2227 Hilfe für Verständnis und Behebung des Fehlers on Thu, 29 May 2014 10:10:22 GMT]]></title><description><![CDATA[<p>Hallo Zusammen,<br />
ich benötige bisschen Hilfe bei dem oben angegebenen Fehlercode. Verstehe nicht genau was ich falsch mache. <code>Links von &quot;-&gt;getSignature&quot; muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.</code> . Ich verstehe wohl irgendwie die Fehlerbezeichnung nicht. Einen Pointer vom Typ medium hab ich ja mit der Variable tmp und den Fülle ich ja dann mit</p>
<pre><code>tmp = new Medium();
</code></pre>
<p>Hier ist der betroffene Codeteil:</p>
<pre><code>int main(){
	MyContainer *container = new MyContainer;
	Medium *tmp = NULL;
	bool abort = false;

	int indexMedien = 0;
	Medium* medium[N];
	/*int indexBook = 0;
	Book* book[N];
	int indexMovie = 0;
	Movie* movie[N];
	*/

	getMenuText();
	char instruction = '0';//auswahl
	while (instruction != 'q'){
		cout &lt;&lt; endl &lt;&lt; &quot;Was wollen Sie tun?&quot; &lt;&lt; endl;
		cout &lt;&lt; &quot;-&gt;&quot;;
		cin &gt;&gt; instruction;
		cout &lt;&lt; endl;
		switch (instruction)
		{
		case 'm':	//erstellen eines neuen Medium		
			tmp = new Medium;

			abort = false;
			for (container-&gt;begin(); ((container-&gt;getItem() != NULL)||abort == true); container-&gt;next()){
			//cout &lt;&lt; &amp;tmp-&gt;getSignature;
				if (tmp-&gt;getSignature == container-&gt;getItem-&gt;getSignature){
					abort = true;
					cout &lt;&lt; &quot;Fehlermeldung: Hinzufügen eines neuen Elementes hat leider nicht geklappt&quot; &lt;&lt; endl;

				}
			}
			//container-&gt;add(tmp);
			break;
		/*case 'b':	//erstellen eines neuen Buches			
			if (indexBook &lt; N){
				book[indexBook] = new Book();
				indexBook++;
				break;
			}
			cout &lt;&lt; &quot;Speicher voll&quot;; break;
		case 'v':	//erstellen eines neuen Movies			
			if (indexMovie &lt; N){
				movie[indexMovie] = new Movie();
				indexMovie++;
				break;
			}
			cout &lt;&lt; &quot;Speicher voll&quot;; break;
			*/
		case 'l':
</code></pre>
<p>Und diese Zeile gefällt ihm nicht, bzw der Pointer tmp:</p>
<pre><code>if (tmp-&gt;getSignature == container-&gt;getItem-&gt;getSignature){
</code></pre>
<p>Das Programm ist eine Übungsaufgabe zu Implementierung eines Containers, und der Container beinhaltet Knoten mit einem next Pointer und dem Element(in dem beispiel jetzt eben das Medium).<br />
Hoffe um Hilfe, da ich wegen dem Fehler nicht mehr weiterkomme,bzw mit die Überprüfung fehlt.<br />
Danke im Voraus <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>
]]></description><link>https://www.c-plusplus.net/forum/post/2401379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401379</guid><dc:creator><![CDATA[benschke]]></dc:creator><pubDate>Thu, 29 May 2014 10:10:22 GMT</pubDate></item><item><title><![CDATA[Reply to error Code C2227 Hilfe für Verständnis und Behebung des Fehlers on Thu, 29 May 2014 10:15:15 GMT]]></title><description><![CDATA[<p>Meinst du vielleicht:</p>
<pre><code>if (tmp-&gt;getSignature() == container-&gt;getItem()-&gt;getSignature())
</code></pre>
<p>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401380</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Thu, 29 May 2014 10:15:15 GMT</pubDate></item><item><title><![CDATA[Reply to error Code C2227 Hilfe für Verständnis und Behebung des Fehlers on Thu, 29 May 2014 10:17:56 GMT]]></title><description><![CDATA[<p>hast Du mal tmp-&gt;getSignature() probiert ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401383</guid><dc:creator><![CDATA[großbuchstaben]]></dc:creator><pubDate>Thu, 29 May 2014 10:17:56 GMT</pubDate></item><item><title><![CDATA[Reply to error Code C2227 Hilfe für Verständnis und Behebung des Fehlers on Thu, 29 May 2014 10:19:39 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> Okay ja jetzt funktioniert es, was ist genau der unterschied wenn ich keine () nach der methode angebe? VisualStudio hat es mit so hingeklatscht (durch die autovervollständigung), daher dachte ich die KLammern sin einfach optional.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401385</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401385</guid><dc:creator><![CDATA[benschke]]></dc:creator><pubDate>Thu, 29 May 2014 10:19:39 GMT</pubDate></item><item><title><![CDATA[Reply to error Code C2227 Hilfe für Verständnis und Behebung des Fehlers on Thu, 29 May 2014 10:22:28 GMT]]></title><description><![CDATA[<p>und noch eine dumme frage, wie markiere ich den Beitrag als erledigt? <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>
]]></description><link>https://www.c-plusplus.net/forum/post/2401387</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401387</guid><dc:creator><![CDATA[benschke]]></dc:creator><pubDate>Thu, 29 May 2014 10:22:28 GMT</pubDate></item><item><title><![CDATA[Reply to error Code C2227 Hilfe für Verständnis und Behebung des Fehlers on Thu, 29 May 2014 11:14:43 GMT]]></title><description><![CDATA[<p>benschke schrieb:</p>
<blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> Okay ja jetzt funktioniert es, was ist genau der unterschied wenn ich keine () nach der methode angebe? VisualStudio hat es mit so hingeklatscht (durch die autovervollständigung), daher dachte ich die KLammern sin einfach optional.</p>
</blockquote>
<p>Ohne die Klammern ist es ein Funktionszeiger.</p>
<p>benschke schrieb:</p>
<blockquote>
<p>und noch eine dumme frage, wie markiere ich den Beitrag als erledigt? <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>
</blockquote>
<p>Gar nicht, sowas wird hier nicht praktiziert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401393</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401393</guid><dc:creator><![CDATA[nwp3]]></dc:creator><pubDate>Thu, 29 May 2014 11:14:43 GMT</pubDate></item></channel></rss>