<?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[Array zurückgeben]]></title><description><![CDATA[<p>Hi,</p>
<p>ich gebe aus einer Funktion ein Array mit 6 ints zurück:</p>
<p>int* getIndices(int startIndex);</p>
<p>Kann ich irgendwie sichtbar machen, dass da immer ein int[6] geliefert wird?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/292774/array-zurückgeben</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 17:27:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/292774.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Sep 2011 18:04:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Array zurückgeben on Sat, 17 Sep 2011 18:04:07 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich gebe aus einer Funktion ein Array mit 6 ints zurück:</p>
<p>int* getIndices(int startIndex);</p>
<p>Kann ich irgendwie sichtbar machen, dass da immer ein int[6] geliefert wird?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120528</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120528</guid><dc:creator><![CDATA[Arraya]]></dc:creator><pubDate>Sat, 17 Sep 2011 18:04:07 GMT</pubDate></item><item><title><![CDATA[Reply to Array zurückgeben on Sat, 17 Sep 2011 18:16:32 GMT]]></title><description><![CDATA[<p>Zeig mal was du vor hast, ich ahne irgendwie, dass das nicht funktioniert. Du könntest auch einen std::vector zurückgeben, spricht da etwas dagegen?</p>
<p>@Die Langsamen: :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120531</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120531</guid><dc:creator><![CDATA[cooky451]]></dc:creator><pubDate>Sat, 17 Sep 2011 18:16:32 GMT</pubDate></item><item><title><![CDATA[Reply to Array zurückgeben on Sat, 17 Sep 2011 18:13:16 GMT]]></title><description><![CDATA[<p>Nein, du übergibst kein Array auf diese Weise, sondern nur einen Zeiger (der vermutlich auf undefinierten Speicher zeigt, nachdem die Funktion hinter sich abgeräumt hat).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120532</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120532</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Sat, 17 Sep 2011 18:13:16 GMT</pubDate></item><item><title><![CDATA[Reply to Array zurückgeben on Sat, 17 Sep 2011 18:14:03 GMT]]></title><description><![CDATA[<p>Darf ich mal so dreist sein und behaupten, dass du es sowieso falsch machst und dich erst einmal da drum kümmern solltest?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120534</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120534</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 17 Sep 2011 18:14:03 GMT</pubDate></item><item><title><![CDATA[Reply to Array zurückgeben on Sat, 17 Sep 2011 18:19:13 GMT]]></title><description><![CDATA[<p>cooky451 schrieb:</p>
<blockquote>
<p>Zeig mal was du vor hast, ich ahne irgendwie, dass das nicht funktioniert. Du könntest auch einen std::vector zurückgeben, spricht da etwas dagegen?</p>
<p>@Die Langsamen: :p</p>
</blockquote>
<p>Wieso einen vector, wenn die größe konstant ist? Finde ich sinnfrei. Dann eher ein arra&lt;int, 6&gt;. Ich glaub ich returne das Array jetzt einfach als out Parameter.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120538</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120538</guid><dc:creator><![CDATA[Arraya]]></dc:creator><pubDate>Sat, 17 Sep 2011 18:19:13 GMT</pubDate></item><item><title><![CDATA[Reply to Array zurückgeben on Sat, 17 Sep 2011 18:35:06 GMT]]></title><description><![CDATA[<p>Arraya schrieb:</p>
<blockquote>
<p>Wieso einen vector, wenn die größe konstant ist? Finde ich sinnfrei. Dann eher ein arra&lt;int, 6&gt;. Ich glaub ich returne das Array jetzt einfach als out Parameter.</p>
</blockquote>
<p>Ich ignoriere TR1. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120539</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120539</guid><dc:creator><![CDATA[cooky451]]></dc:creator><pubDate>Sat, 17 Sep 2011 18:35:06 GMT</pubDate></item><item><title><![CDATA[Reply to Array zurückgeben on Sat, 17 Sep 2011 18:41:04 GMT]]></title><description><![CDATA[<p>cooky451 schrieb:</p>
<blockquote>
<p>Arraya schrieb:</p>
<blockquote>
<p>Wieso einen vector, wenn die größe konstant ist? Finde ich sinnfrei. Dann eher ein arra&lt;int, 6&gt;. Ich glaub ich returne das Array jetzt einfach als out Parameter.</p>
</blockquote>
<p>Ich ignoriere TR1. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>boost::array :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120542</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120542</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Sat, 17 Sep 2011 18:41:04 GMT</pubDate></item><item><title><![CDATA[Reply to Array zurückgeben on Sun, 18 Sep 2011 08:53:01 GMT]]></title><description><![CDATA[<p>Arraya schrieb:</p>
<blockquote>
<p>ich gebe aus einer Funktion ein Array mit 6 ints zurück:<br />
int* getIndices(int startIndex);</p>
</blockquote>
<p>Nein, tust Du nicht. Du gibst einen Zeiger zurück. Wo zeigt der denn hin und wie lange lebt das / soll es leben, worauf er zeigt?</p>
<p>Arraya schrieb:</p>
<blockquote>
<p>Kann ich irgendwie sichtbar machen, dass da immer ein int[6] geliefert wird?</p>
</blockquote>
<p>array&lt;int,6&gt; getIndices(int startIndex);</p>
<p>( aus boost:: oder std::tr1:: oder std:: )</p>
<p>Bei der Gelegenheit möchte ich einen Vortrag empfehlen, den ich gestern gesehen habe. Da geht es um &quot;modernes C++&quot;.<br />
<a href="http://www.c-plusplus.net/forum/292795" rel="nofollow">http://www.c-plusplus.net/forum/292795</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2120705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2120705</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sun, 18 Sep 2011 08:53:01 GMT</pubDate></item></channel></rss>