<?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[std::vector]]></title><description><![CDATA[<p>Hallo,</p>
<p>so wie ich es verstanden habe, befinden sich die Daten eines STL Vektors nicht zusammenhaengend im Speicher (stimmt das?).<br />
Gibt es dazu eine guenstige Methode alle Elemente in einen zusammenhaengenden Speicherbereich zu kopieren?</p>
<p>Weiterhin konnte ich nicht herausfinden wie man einen STL Vektor mit mehreren Elementen, unterschiedlichen Types erstellt.</p>
<p>Ich waehre unendlich dankbar fuer eure Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/122841/std-vector</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 08:06:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/122841.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Oct 2005 16:17:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::vector on Mon, 10 Oct 2005 16:17:00 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>so wie ich es verstanden habe, befinden sich die Daten eines STL Vektors nicht zusammenhaengend im Speicher (stimmt das?).<br />
Gibt es dazu eine guenstige Methode alle Elemente in einen zusammenhaengenden Speicherbereich zu kopieren?</p>
<p>Weiterhin konnte ich nicht herausfinden wie man einen STL Vektor mit mehreren Elementen, unterschiedlichen Types erstellt.</p>
<p>Ich waehre unendlich dankbar fuer eure Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889013</guid><dc:creator><![CDATA[Bartflechter]]></dc:creator><pubDate>Mon, 10 Oct 2005 16:17:00 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Mon, 10 Oct 2005 16:21:58 GMT]]></title><description><![CDATA[<p>Sind zusammenhängend!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889016</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889016</guid><dc:creator><![CDATA[falsch!]]></dc:creator><pubDate>Mon, 10 Oct 2005 16:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Mon, 10 Oct 2005 16:24:01 GMT]]></title><description><![CDATA[<p>unterschiedliche tyen geht nicht.<br />
es ist sehr beliebt, bei klassenhierarchien, immer nur zeiger auf die basisklasse zu nehmen und in den vector zu stopfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889020</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889020</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 10 Oct 2005 16:24:01 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Mon, 10 Oct 2005 16:25:31 GMT]]></title><description><![CDATA[<p>Oh - sehr gut. Vielen Dank fuer deine Antwort.<br />
Echt dumm dass ich dazu keinerlei Information in der Literatur erhalten habe.</p>
<p>Nun ist noch die Frage offen wie ich mehrere Elemente unterhschiedlichen Types in einen Vektor bekomme, ohne diese vorher in einer Struktur oder aehnlich zu kapseln.</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889023</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889023</guid><dc:creator><![CDATA[Bartflechter]]></dc:creator><pubDate>Mon, 10 Oct 2005 16:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Mon, 10 Oct 2005 16:26:09 GMT]]></title><description><![CDATA[<p>Ahh.. schade.</p>
<p>Vielen Dank euch allen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889025</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889025</guid><dc:creator><![CDATA[Bartflechter]]></dc:creator><pubDate>Mon, 10 Oct 2005 16:26:09 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Mon, 10 Oct 2005 17:40:41 GMT]]></title><description><![CDATA[<p>Bartflechter schrieb:</p>
<blockquote>
<p>Nun ist noch die Frage offen wie ich mehrere Elemente unterhschiedlichen Types in einen Vektor bekomme, ohne diese vorher in einer Struktur oder aehnlich zu kapseln.</p>
</blockquote>
<p>Ist die Frage noch offen oder hast du volkards Antwort nicht gelesen?</p>
<pre><code class="language-cpp">std::vector&lt;MyBaseClass*&gt; myVector;
// bzw
std::vector&lt;some_smart_ptr&lt;MyBaseClass&gt; &gt; mySmartVector;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/889073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889073</guid><dc:creator><![CDATA[finix]]></dc:creator><pubDate>Mon, 10 Oct 2005 17:40:41 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Mon, 10 Oct 2005 18:15:55 GMT]]></title><description><![CDATA[<p>Alternativ kannst du es auch mit boost::variant versuchen.<br />
<a href="http://www.boost.org/doc/html/variant.html" rel="nofollow">http://www.boost.org/doc/html/variant.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/889093</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889093</guid><dc:creator><![CDATA[Redhead]]></dc:creator><pubDate>Mon, 10 Oct 2005 18:15:55 GMT</pubDate></item></channel></rss>