<?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[Überladen der Operatoren funzt nicht...]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich bin ziemlich neu in der C++-Programmierung und hoffe auf disem Wege, mein Wissen über C++ zu erweitern. Ich habe zum Überladen von Operatoren folgenden Code geschrieben. Wenn ich aber meinen Compiler Codeblocks laufen lasse, bekomme ich folgende Fehlermeldung:</p>
<p>no match for Operator &gt;&gt;....usw.</p>
<p>Die Fehlermeldung bezieht sich auf die Zeile, in der ich den Fragezeichensmilie reinkopiert habe...</p>
<p>Irgendjemand eine Idee, was fehlt bzw falsch ist?</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;cstdlib&gt;<br />
using namespace std;</p>
<p>struct complex</p>
<p>{<br />
double re;<br />
double im;<br />
};</p>
<p>complex operator-(const complex&amp;);<br />
complex operator+(const complex&amp;, const complex&amp;);<br />
complex operator-(const complex&amp;, const complex&amp;);</p>
<p>complex operator-(const complex&amp; x)</p>
<p>{<br />
complex temp;<br />
temp.re= -x.re;<br />
temp.im= -x.im;<br />
return temp;<br />
}<br />
complex operator+(const complex&amp; x, const complex&amp; y)<br />
{</p>
<p>complex sum;</p>
<p><a href="http://sum.re" rel="nofollow">sum.re</a> = <a href="http://x.re" rel="nofollow">x.re</a> + <a href="http://y.re" rel="nofollow">y.re</a>;<br />
<a href="http://sum.im" rel="nofollow">sum.im</a> = <a href="http://x.re" rel="nofollow">x.re</a> + <a href="http://y.re" rel="nofollow">y.re</a>;</p>
<p>return sum;<br />
}</p>
<p>complex operator-(const complex&amp; x, const complex&amp; y)</p>
<p>{<br />
complex difference;<br />
<a href="http://difference.re" rel="nofollow">difference.re</a> = <a href="http://x.re" rel="nofollow">x.re</a> - <a href="http://y.re" rel="nofollow">y.re</a>;<br />
<a href="http://difference.im" rel="nofollow">difference.im</a> = <a href="http://y.re" rel="nofollow">y.re</a> - <a href="http://y.re" rel="nofollow">y.re</a>;</p>
<p>return difference;<br />
}</p>
<p>int main(void)</p>
<p>{<br />
complex z1,z2,z3,z4,z5;<br />
cout &lt;&lt; &quot;Bitte geben Sie die komplexe Zahl Z1 ein: &quot; &lt;&lt; endl;<br />
cin &gt;&gt; z1; <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="😕"
    /><br />
cout &lt;&lt; &quot;Bitte geben Sie die komplexe Zahl z2 ein: &quot; &lt;&lt; endl;<br />
cin &gt;&gt; z2;<br />
cout &lt;&lt; &quot;z1 = &quot; &lt;&lt; z1 &lt;&lt; endl &lt;&lt; &quot;z2 = &quot; &lt;&lt; z2 &lt;&lt; endl;<br />
z3 = -z1;<br />
cout &lt;&lt; &quot;Die komplexe Zahl &quot; &lt;&lt; z1 &lt;&lt; &quot; mit dem unaeren Operator - umgeändert zu &quot; &lt;&lt; z3 &lt;&lt; endl;</p>
<p>z4 = z1 - z2;<br />
cout &lt;&lt; &quot;z4 = z1 - z2 = &quot; &lt;&lt; z4 &lt;&lt; endl;<br />
z5 = z1 + z2;<br />
cout &lt;&lt; &quot;Hier ist das Ergebnis der binaere Addition des uberladenen Operators *: &quot; &lt;&lt; z5 &lt;&lt; endl;<br />
return 0;<br />
}</p>
<p>Viele Grüße, Dalice66</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/297872/überladen-der-operatoren-funzt-nicht</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 05:41:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/297872.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 08 Jan 2012 19:16:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:16:13 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich bin ziemlich neu in der C++-Programmierung und hoffe auf disem Wege, mein Wissen über C++ zu erweitern. Ich habe zum Überladen von Operatoren folgenden Code geschrieben. Wenn ich aber meinen Compiler Codeblocks laufen lasse, bekomme ich folgende Fehlermeldung:</p>
<p>no match for Operator &gt;&gt;....usw.</p>
<p>Die Fehlermeldung bezieht sich auf die Zeile, in der ich den Fragezeichensmilie reinkopiert habe...</p>
<p>Irgendjemand eine Idee, was fehlt bzw falsch ist?</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;cstdlib&gt;<br />
using namespace std;</p>
<p>struct complex</p>
<p>{<br />
double re;<br />
double im;<br />
};</p>
<p>complex operator-(const complex&amp;);<br />
complex operator+(const complex&amp;, const complex&amp;);<br />
complex operator-(const complex&amp;, const complex&amp;);</p>
<p>complex operator-(const complex&amp; x)</p>
<p>{<br />
complex temp;<br />
temp.re= -x.re;<br />
temp.im= -x.im;<br />
return temp;<br />
}<br />
complex operator+(const complex&amp; x, const complex&amp; y)<br />
{</p>
<p>complex sum;</p>
<p><a href="http://sum.re" rel="nofollow">sum.re</a> = <a href="http://x.re" rel="nofollow">x.re</a> + <a href="http://y.re" rel="nofollow">y.re</a>;<br />
<a href="http://sum.im" rel="nofollow">sum.im</a> = <a href="http://x.re" rel="nofollow">x.re</a> + <a href="http://y.re" rel="nofollow">y.re</a>;</p>
<p>return sum;<br />
}</p>
<p>complex operator-(const complex&amp; x, const complex&amp; y)</p>
<p>{<br />
complex difference;<br />
<a href="http://difference.re" rel="nofollow">difference.re</a> = <a href="http://x.re" rel="nofollow">x.re</a> - <a href="http://y.re" rel="nofollow">y.re</a>;<br />
<a href="http://difference.im" rel="nofollow">difference.im</a> = <a href="http://y.re" rel="nofollow">y.re</a> - <a href="http://y.re" rel="nofollow">y.re</a>;</p>
<p>return difference;<br />
}</p>
<p>int main(void)</p>
<p>{<br />
complex z1,z2,z3,z4,z5;<br />
cout &lt;&lt; &quot;Bitte geben Sie die komplexe Zahl Z1 ein: &quot; &lt;&lt; endl;<br />
cin &gt;&gt; z1; <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="😕"
    /><br />
cout &lt;&lt; &quot;Bitte geben Sie die komplexe Zahl z2 ein: &quot; &lt;&lt; endl;<br />
cin &gt;&gt; z2;<br />
cout &lt;&lt; &quot;z1 = &quot; &lt;&lt; z1 &lt;&lt; endl &lt;&lt; &quot;z2 = &quot; &lt;&lt; z2 &lt;&lt; endl;<br />
z3 = -z1;<br />
cout &lt;&lt; &quot;Die komplexe Zahl &quot; &lt;&lt; z1 &lt;&lt; &quot; mit dem unaeren Operator - umgeändert zu &quot; &lt;&lt; z3 &lt;&lt; endl;</p>
<p>z4 = z1 - z2;<br />
cout &lt;&lt; &quot;z4 = z1 - z2 = &quot; &lt;&lt; z4 &lt;&lt; endl;<br />
z5 = z1 + z2;<br />
cout &lt;&lt; &quot;Hier ist das Ergebnis der binaere Addition des uberladenen Operators *: &quot; &lt;&lt; z5 &lt;&lt; endl;<br />
return 0;<br />
}</p>
<p>Viele Grüße, Dalice66</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165481</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165481</guid><dc:creator><![CDATA[Dalice66]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:16:13 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:18:04 GMT]]></title><description><![CDATA[<p>erstmal hier:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
using namespace std;

struct complex
{
	double re;
	double im;
};

complex operator-(const complex&amp;);
complex operator+(const complex&amp;, const complex&amp;);
complex operator-(const complex&amp;, const complex&amp;);

complex operator-(const complex&amp; x)
{
	complex temp;
	temp.re= -x.re;
	temp.im= -x.im;
	return temp;
}
complex operator+(const complex&amp; x, const complex&amp; y)
{
	complex sum;

	sum.re = x.re + y.re;
	sum.im = x.re + y.re;

	return sum;
}

complex operator-(const complex&amp; x, const complex&amp; y)
{
	complex difference;
	difference.re = x.re - y.re;
	difference.im = y.re - y.re;

	return difference;
}

int main(void)
{
	complex z1,z2,z3,z4,z5;
	cout &lt;&lt; &quot;Bitte geben Sie die komplexe Zahl Z1 ein: &quot; &lt;&lt; endl;
	cin &gt;&gt; z1; :confused:
	cout &lt;&lt; &quot;Bitte geben Sie die komplexe Zahl z2 ein: &quot; &lt;&lt; endl;
	cin &gt;&gt; z2;
	cout &lt;&lt; &quot;z1 = &quot; &lt;&lt; z1 &lt;&lt; endl &lt;&lt; &quot;z2 = &quot; &lt;&lt; z2 &lt;&lt; endl;
	z3 = -z1;
	cout &lt;&lt; &quot;Die komplexe Zahl &quot; &lt;&lt; z1 &lt;&lt; &quot; mit dem unaeren Operator - umgeändert zu &quot; &lt;&lt; z3 &lt;&lt; endl;

	z4 = z1 - z2;
	cout &lt;&lt; &quot;z4 = z1 - z2 = &quot; &lt;&lt; z4 &lt;&lt; endl;
	z5 = z1 + z2;
	cout &lt;&lt; &quot;Hier ist das Ergebnis der binaere Addition des uberladenen Operators *: &quot; &lt;&lt; z5 &lt;&lt; endl;

	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2165483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165483</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:18:04 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:20:15 GMT]]></title><description><![CDATA[<p>ist doch ganz klar. in zeile 45 und 47 versuchst du eine komplexe zahl einzulesen, in zeile 48, 50, 53 und 55 versuchst du sie auszugeben.</p>
<p>dafür musst du aber erstmal die operatoren &lt;&lt; und &gt;&gt; für cin sowie cout überladen, dann klappt das auch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165484</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:20:15 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:20:27 GMT]]></title><description><![CDATA[<p>wenn du den operator&gt;&gt; benutzen willst, musst du den natürlich auch zur verfügung stellen...</p>
<p>C++-Quellcode gehört auch in C++ Tags:</p>
<pre><code class="language-cpp">struct complex
{
  double real;
  double imag;
};

#include &lt;iostream&gt;

std::istream&amp; operator&gt;&gt; (std::istream&amp; s, complex&amp; value)
{
  s &gt;&gt; real &gt;&gt; imag;
  return s;
}

int main()
{
  complex c;
  std::cin &gt;&gt; c;
}
</code></pre>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165485</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165485</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:20:27 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:22:07 GMT]]></title><description><![CDATA[<p>Du hast keine Operator &gt;&gt; für deine Complex-Struktur.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165486</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165486</guid><dc:creator><![CDATA[Zeus]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:22:07 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:29:14 GMT]]></title><description><![CDATA[<p>unskilled schrieb:</p>
<blockquote>
<pre><code class="language-cpp">struct complex
{
  double real;
  double imag;
};

#include &lt;iostream&gt;

std::istream&amp; operator&gt;&gt; (std::istream&amp; s, complex&amp; value)
{
  s &gt;&gt; real &gt;&gt; imag;
  return s;
}

int main()
{
  complex c;
  std::cin &gt;&gt; c;
}
</code></pre>
</blockquote>
<p>Mir schaudert es vor dem Compiler der das fehlerfrei Compiliert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> (Edit: hm! dafür gibt's ja 'nen Smilie!)</p>
<pre><code class="language-cpp">std::istream&amp; operator&gt;&gt; (std::istream&amp; s, complex&amp; value)//Wofür hab'n wir bloß diesen Parameter value?
{
  return s &gt;&gt; value.real &gt;&gt; value.imag;//So is' schöner
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2165490</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165490</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:29:14 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:34:12 GMT]]></title><description><![CDATA[<p>Hacker schrieb:</p>
<blockquote>
<p>unskilled schrieb:</p>
<blockquote>
<p>...</p>
</blockquote>
</blockquote>
<p>huch <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="😃"
    /> sry, natürlich vergessen <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>edit: ob man das return auf ne extra zeile schreibt oder nicht, ist wohl geschmackssache. ich mags auf der gleichen zeile nicht so sehr.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165499</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:34:12 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:44:22 GMT]]></title><description><![CDATA[<p>unskilled schrieb:</p>
<blockquote>
<p>ob man das return auf ne extra zeile schreibt oder nicht, ist wohl geschmackssache. ich mags auf der gleichen zeile nicht so sehr.</p>
</blockquote>
<pre><code class="language-cpp">std::istream&amp; operator&gt;&gt; (std::istream&amp; s, complex&amp; value)
{
  return 
         s &gt;&gt; value.real &gt;&gt; value.imag;
}
</code></pre>
<p><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="😃"
    /> :xmas1:</p>
<p>Edit: Wenn man noch auf die schlaue idee der Datenkapselung kommt, ist</p>
<pre><code class="language-cpp">friend
</code></pre>
<p>dein Freund oder nicht. Lieber setter Methoden, nich'?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165508</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:44:22 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Sun, 08 Jan 2012 19:43:22 GMT]]></title><description><![CDATA[<p>so ists natürlich keine geschmackssache mehr... boar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165511</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sun, 08 Jan 2012 19:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Mon, 09 Jan 2012 08:13:18 GMT]]></title><description><![CDATA[<p>Hacker schrieb:</p>
<blockquote>
<p>ist</p>
<pre><code class="language-cpp">friend
</code></pre>
<p>dein Freund oder nicht.</p>
</blockquote>
<p>Oder nicht. friend ist niemandes Freund, sondern ein potentiell echt fieser Eindringling <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /><br />
Aber auch das ist wieder Geschmackssache...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165657</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165657</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Mon, 09 Jan 2012 08:13:18 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Mon, 09 Jan 2012 09:23:04 GMT]]></title><description><![CDATA[<p>pumuckl schrieb:</p>
<blockquote>
<p>Hacker schrieb:</p>
<blockquote>
<p>ist</p>
<pre><code class="language-cpp">friend
</code></pre>
<p>dein Freund oder nicht.</p>
</blockquote>
<p>Oder nicht. friend ist niemandes Freund, sondern ein potentiell echt fieser Eindringling <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /><br />
Aber auch das ist wieder Geschmackssache...</p>
</blockquote>
<p>Hier braucht es weder Setter noch friend. Hier reicht ein quasi funktionaler Ansatz:</p>
<pre><code class="language-cpp">class complex
{
public:
    complex(double re = 0.0, double im = 0.0);
    //...
};

std::istream&amp; operator&gt;&gt; (std::istream&amp; s, complex&amp; value)
{
    double re = 0;
    double im = 0;
    s &gt;&gt; re &gt;&gt; im;
    value = complex(re, im);
    return s;
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2165659</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165659</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Mon, 09 Jan 2012 09:23:04 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Mon, 09 Jan 2012 11:44:42 GMT]]></title><description><![CDATA[<p>Tachyon schrieb:</p>
<blockquote>
<p>pumuckl schrieb:</p>
<blockquote>
<p>Hacker schrieb:</p>
<blockquote>
<p>ist</p>
<pre><code class="language-cpp">friend
</code></pre>
<p>dein Freund oder nicht.</p>
</blockquote>
<p>Oder nicht. friend ist niemandes Freund, sondern ein potentiell echt fieser Eindringling <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /><br />
Aber auch das ist wieder Geschmackssache...</p>
</blockquote>
<p>Hier braucht es weder Setter noch friend. Hier reicht ein quasi funktionaler Ansatz:</p>
<pre><code class="language-cpp">class complex
{
public:
    complex(double re = 0.0, double im = 0.0);
    //...
};

std::istream&amp; operator&gt;&gt; (std::istream&amp; s, complex&amp; value)
{
    double re = 0;
    double im = 0;
    s &gt;&gt; re &gt;&gt; im;
    value = complex(re, im);
    return s;
};
</code></pre>
</blockquote>
<p>Das ist indirekt ein setter, aber ein Schlechter. Stell dir vor, du resettest ausversehen noch andere Variablen(hier nicht, bei größeren Klassen aber muss was anderes her).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165703</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165703</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 09 Jan 2012 11:44:42 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Mon, 09 Jan 2012 12:15:13 GMT]]></title><description><![CDATA[<p>Hacker schrieb:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>Ich zitiere hier mal Penny von BBT...<br />
WAS?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165722</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165722</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Mon, 09 Jan 2012 12:15:13 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Mon, 09 Jan 2012 12:21:06 GMT]]></title><description><![CDATA[<p>Tachyon schrieb:</p>
<blockquote>
<p>Hacker schrieb:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>Ich zitiere hier mal Penny von BBT...<br />
WAS?</p>
</blockquote>
<p>Guck mal, du erstellst ein Objekt und weißt dann dem anderem dieses zu. Solange der keinen zuweisungsoperator mit rvalue-ref. hat, kann das bei größeren Klassen unnötig werden, du könntest auch noch andere Variablen ausversehen zurücksetzen. Was spricht denn gegen einen setter?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165727</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165727</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 09 Jan 2012 12:21:06 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Mon, 09 Jan 2012 12:20:59 GMT]]></title><description><![CDATA[<p>Also ich verstehe Hackers Post auch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165729</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165729</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Mon, 09 Jan 2012 12:20:59 GMT</pubDate></item><item><title><![CDATA[Reply to Überladen der Operatoren funzt nicht... on Mon, 09 Jan 2012 12:21:30 GMT]]></title><description><![CDATA[<p>Hacker schrieb:</p>
<blockquote>
<p>Tachyon schrieb:</p>
<blockquote>
<p>Hacker schrieb:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>Ich zitiere hier mal Penny von BBT...<br />
WAS?</p>
</blockquote>
<p>Guck mal, du erstellst ein Objekt und weißt dann dem anderem dieses zu. Solange der keinen zuweisungsoperator mit rvalue-ref. hat, kann das bei größeren Klassen unnötig werden. Was spricht denn gegen einen setter?</p>
</blockquote>
<p>Unötiges aufblähen des Interfaces? Guck Dir mal <code>std::complex</code> an...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2165730</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2165730</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Mon, 09 Jan 2012 12:21:30 GMT</pubDate></item></channel></rss>