<?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[Objekt in std::vector Löschen]]></title><description><![CDATA[<p>Liebe Leser.</p>
<p>Ich habe ein kleines Problem.</p>
<p>Beispielsweise habe ich eine Array mit 10 integer Objekten.</p>
<pre><code>std::vector&lt;int&gt;     array(10);
</code></pre>
<p>Wie kann ich ein Objekt in der Array löschen, sodass die anderen Objekte danach nachrücken?<br />
Gibt es eine Funktion dafür?</p>
<p>Ich hoffe, das mir einer helfen kann.<br />
Danke im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/328771/objekt-in-std-vector-löschen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 09:51:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/328771.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 26 Oct 2014 13:01:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Objekt in std::vector Löschen on Sun, 26 Oct 2014 13:01:37 GMT]]></title><description><![CDATA[<p>Liebe Leser.</p>
<p>Ich habe ein kleines Problem.</p>
<p>Beispielsweise habe ich eine Array mit 10 integer Objekten.</p>
<pre><code>std::vector&lt;int&gt;     array(10);
</code></pre>
<p>Wie kann ich ein Objekt in der Array löschen, sodass die anderen Objekte danach nachrücken?<br />
Gibt es eine Funktion dafür?</p>
<p>Ich hoffe, das mir einer helfen kann.<br />
Danke im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2424104</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2424104</guid><dc:creator><![CDATA[Sebastian Müller]]></dc:creator><pubDate>Sun, 26 Oct 2014 13:01:37 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt in std::vector Löschen on Sun, 26 Oct 2014 13:09:08 GMT]]></title><description><![CDATA[<pre><code>array.erase(array.begin() + index);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2424107</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2424107</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sun, 26 Oct 2014 13:09:08 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt in std::vector Löschen on Sun, 26 Oct 2014 14:06:28 GMT]]></title><description><![CDATA[<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2424112</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2424112</guid><dc:creator><![CDATA[Sebastian Müller]]></dc:creator><pubDate>Sun, 26 Oct 2014 14:06:28 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt in std::vector Löschen on Mon, 27 Oct 2014 08:39:58 GMT]]></title><description><![CDATA[<p>Wenn die Reihenfolge der integer Objekte egal ist, kannst du auch das Objekt, dass du loeschen willst, mit dem letzten Objekt swapen und dann popback benutzen.</p>
<p>Das verhindert einen Copy-Vorgang.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2424255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2424255</guid><dc:creator><![CDATA[chp++]]></dc:creator><pubDate>Mon, 27 Oct 2014 08:39:58 GMT</pubDate></item></channel></rss>