<?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[Referenz]]></title><description><![CDATA[<p>warum is ne referenz schneller als ne normale variable?</p>
<p>sprich:</p>
<pre><code class="language-cpp">void gaga(const short &amp;var);
</code></pre>
<p>schneller als:</p>
<pre><code class="language-cpp">void gaga(short var);
</code></pre>
<p>?</p>
<p>(steht in volkards tutorial)</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252874/referenz</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 04:13:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252874.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 25 Oct 2009 20:31:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Referenz on Sun, 25 Oct 2009 20:31:02 GMT]]></title><description><![CDATA[<p>warum is ne referenz schneller als ne normale variable?</p>
<p>sprich:</p>
<pre><code class="language-cpp">void gaga(const short &amp;var);
</code></pre>
<p>schneller als:</p>
<pre><code class="language-cpp">void gaga(short var);
</code></pre>
<p>?</p>
<p>(steht in volkards tutorial)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1798240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1798240</guid><dc:creator><![CDATA[reference]]></dc:creator><pubDate>Sun, 25 Oct 2009 20:31:02 GMT</pubDate></item><item><title><![CDATA[Reply to Referenz on Sun, 25 Oct 2009 20:32:36 GMT]]></title><description><![CDATA[<p>Ist sie nicht, jedenfalls nicht in diesem Fall.<br />
Für komplexere Objekte vermeidest du mit einer Referenz, dass eine Kopie des Objekts angefertigt wird (und manche Objekte sind eben auch nicht kopierbar).<br />
Eine Referenz ist intern nichts anderes als ein verkappter Zeiger.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1798242</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1798242</guid><dc:creator><![CDATA[Nanyuki]]></dc:creator><pubDate>Sun, 25 Oct 2009 20:32:36 GMT</pubDate></item><item><title><![CDATA[Reply to Referenz on Sun, 25 Oct 2009 20:43:17 GMT]]></title><description><![CDATA[<p>Bei Call by Value wird eine extra Kopie des übergebenen Parameters erstellt. Bei Call by Reference wird direkt mit dem Objekt gearbeitet. Vergleiche:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

void func(int &amp;a) //lass mal das Ampersand weg! Dann wird eine Kopie angelegt und es wird drei und nicht vier ausgegeben!
{
	++a;
}

int main()
{
	int i = 3;
	func(i);
	cout &lt;&lt; i;

	return 0;
}
</code></pre>
<p>lg, freakC++</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1798248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1798248</guid><dc:creator><![CDATA[freakC++]]></dc:creator><pubDate>Sun, 25 Oct 2009 20:43:17 GMT</pubDate></item></channel></rss>