<?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[Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt]]></title><description><![CDATA[<p>closed.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/316273/reference-rückgabewert-fragen-allerlei-zu-projekt</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Jul 2026 06:12:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/316273.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 27 Apr 2013 17:55:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 22:18:13 GMT]]></title><description><![CDATA[<p>closed.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2319100</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319100</guid><dc:creator><![CDATA[luk1990]]></dc:creator><pubDate>Sat, 27 Apr 2013 22:18:13 GMT</pubDate></item><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 18:00:28 GMT]]></title><description><![CDATA[<p>Wegen dem Semikolon:<br />
Klassendefinitionen werden mit ; abgeschlossen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2319101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319101</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sat, 27 Apr 2013 18:00:28 GMT</pubDate></item><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 18:03:34 GMT]]></title><description><![CDATA[<p>ja auf welches define bezieht sich das dann?<br />
hab die classen ja nur mit include eingebunden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2319103</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319103</guid><dc:creator><![CDATA[luk1990]]></dc:creator><pubDate>Sat, 27 Apr 2013 18:03:34 GMT</pubDate></item><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 18:04:57 GMT]]></title><description><![CDATA[<pre><code>class foo
{
    // stuff und so
}; //&lt;- SEMIKOLON!
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2319105</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319105</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sat, 27 Apr 2013 18:04:57 GMT</pubDate></item><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 18:05:43 GMT]]></title><description><![CDATA[<p>ah klar. danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2319106</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319106</guid><dc:creator><![CDATA[luk1990]]></dc:creator><pubDate>Sat, 27 Apr 2013 18:05:43 GMT</pubDate></item><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 18:43:46 GMT]]></title><description><![CDATA[<p>luk1990 schrieb:</p>
<blockquote>
<p>2.) als testroutine wird einem leeren coin-magazine 20x 50Rappen-Stücke eingelagert, und dann den lagerbestand abgefragt. jedoch bekomme ich null zurück. wo liegt mein fehler?</p>
</blockquote>
<p>Du kopierst CoinMagazin, d.h. bei jedem Aufruf von getCoinMagazine() benutzt du ein anderes. Das Stichwort dazu steht im Titel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2319121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319121</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Sat, 27 Apr 2013 18:43:46 GMT</pubDate></item><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 19:24:07 GMT]]></title><description><![CDATA[<p>genau das hab ich auch noch nicht verstanden.<br />
wie kann ich eine referenz anlegen?</p>
<pre><code>CoinMagazine getCoinMagazine(){
        //how to write a reference??? // like arrays in c, w.m. always adress?
        return coinMagazine;
    }
</code></pre>
<p>ich hab versucht return &amp;coinMagazine;<br />
kenne bisher nur pointer wie man sie in c nutzt. wie funktioniert das in c++?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2319134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319134</guid><dc:creator><![CDATA[luk1990]]></dc:creator><pubDate>Sat, 27 Apr 2013 19:24:07 GMT</pubDate></item><item><title><![CDATA[Reply to Reference &#x2F; Rückgabewert - Fragen allerlei zu Projekt on Sat, 27 Apr 2013 19:29:18 GMT]]></title><description><![CDATA[<p>Damit gibst du die Adresse zurück.<br />
Du musst den Wert zurückgeben und dem Compiler sagen, dass es eine Referenz sein soll.<br />
Das machst du mit dem &amp; hinter dem Typen, also:</p>
<pre><code>CoinMagazine&amp; getCoinMagazine()
{
    return coinMagazine;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2319137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2319137</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sat, 27 Apr 2013 19:29:18 GMT</pubDate></item></channel></rss>