<?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[CStringArray als Rückgabewert ein Problem?]]></title><description><![CDATA[<p>Hallo</p>
<p>ich hab das VS2005 und hab mir gerade eine Methode geschrieben, die ein Objekt von Typ CStringArray zurück gibt.</p>
<p>Das macht er aber nicht und meckert mir an, dass ich auf ein protected Element von der Klasse nicht zugreifen kann.</p>
<p>Im VS2003 hat das auch ohne Probleme geklappt.</p>
<p>Ich hab das Attribut dann einfach mal als public gemacht, aber das hat auch net geholfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /></p>
<p>Hat jemand ne Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/194289/cstringarray-als-rückgabewert-ein-problem</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 01:19:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/194289.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Oct 2007 19:50:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CStringArray als Rückgabewert ein Problem? on Thu, 04 Oct 2007 19:50:47 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ich hab das VS2005 und hab mir gerade eine Methode geschrieben, die ein Objekt von Typ CStringArray zurück gibt.</p>
<p>Das macht er aber nicht und meckert mir an, dass ich auf ein protected Element von der Klasse nicht zugreifen kann.</p>
<p>Im VS2003 hat das auch ohne Probleme geklappt.</p>
<p>Ich hab das Attribut dann einfach mal als public gemacht, aber das hat auch net geholfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /></p>
<p>Hat jemand ne Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378177</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378177</guid><dc:creator><![CDATA[MSS-Software]]></dc:creator><pubDate>Thu, 04 Oct 2007 19:50:47 GMT</pubDate></item><item><title><![CDATA[Reply to CStringArray als Rückgabewert ein Problem? on Fri, 05 Oct 2007 05:49:18 GMT]]></title><description><![CDATA[<p>#schuettel#</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378264</guid><dc:creator><![CDATA[EXDW]]></dc:creator><pubDate>Fri, 05 Oct 2007 05:49:18 GMT</pubDate></item><item><title><![CDATA[Reply to CStringArray als Rückgabewert ein Problem? on Fri, 05 Oct 2007 05:58:50 GMT]]></title><description><![CDATA[<blockquote>
<p>Im VS2003 hat das auch ohne Probleme geklappt</p>
</blockquote>
<p>Wirklich?</p>
<p>Gib das Array mal als Referenz zurück:</p>
<pre><code class="language-cpp">private:
CStringArray m_mein_array;
public:
CStringArray&amp; GetArray() {return m_mein_array;}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1378270</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378270</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 05 Oct 2007 05:58:50 GMT</pubDate></item><item><title><![CDATA[Reply to CStringArray als Rückgabewert ein Problem? on Fri, 05 Oct 2007 06:00:44 GMT]]></title><description><![CDATA[<p>CStringArray hat keinen Copy-Constructor und keinen operator=. Wie soll man also solch en Objekt als Ergebnis einer Funktion zurückgeben?<br />
Das ging noch nie in irgendeiner MFC Version!</p>
<p>Eine Referenz zurückgeben ist auch nicht gut. Besser eine Funktion schreiben, die den Array als Referenz aufnimmt.</p>
<pre><code class="language-cpp">void GetArray(CStringArray&amp; array) 
{
...
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1378274</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378274</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Fri, 05 Oct 2007 06:00:44 GMT</pubDate></item></channel></rss>