<?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[Lerre Token löschen]]></title><description><![CDATA[<p>Hey Leute,</p>
<p>folgendes Beispiel:</p>
<p>&quot;12345&quot; in Token zerlegt 1,2,3,4 wobei 1 die tok nummer 1 hat, 2 die tok nummer 2 usw.<br />
Wenn ich jetzt z.b. für tok [2] die Summe aus tok[3] und tok[4] einsetze und tok[3 und 4] &quot;leere&quot; sähe das wie folgt aus:</p>
<p>value: 1 7 ' ' 5<br />
tok: 1 2 3 4 5</p>
<p>Aber wie schaffe ich es nun das tok[5] an das letzte tok mit einem Inhalt (value) herranzurücken? Damit es dann am Ende so aussieht:</p>
<p>Vorher:<br />
value: 1 7 ' ' 5<br />
tok: 1 2 3 4 5</p>
<p>Nacher:<br />
value: 1 7 5<br />
tok: 1 2 3</p>
<p>Danke für eure Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/293168/lerre-token-löschen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 13:09:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/293168.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Sep 2011 17:59:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Lerre Token löschen on Mon, 26 Sep 2011 17:59:49 GMT]]></title><description><![CDATA[<p>Hey Leute,</p>
<p>folgendes Beispiel:</p>
<p>&quot;12345&quot; in Token zerlegt 1,2,3,4 wobei 1 die tok nummer 1 hat, 2 die tok nummer 2 usw.<br />
Wenn ich jetzt z.b. für tok [2] die Summe aus tok[3] und tok[4] einsetze und tok[3 und 4] &quot;leere&quot; sähe das wie folgt aus:</p>
<p>value: 1 7 ' ' 5<br />
tok: 1 2 3 4 5</p>
<p>Aber wie schaffe ich es nun das tok[5] an das letzte tok mit einem Inhalt (value) herranzurücken? Damit es dann am Ende so aussieht:</p>
<p>Vorher:<br />
value: 1 7 ' ' 5<br />
tok: 1 2 3 4 5</p>
<p>Nacher:<br />
value: 1 7 5<br />
tok: 1 2 3</p>
<p>Danke für eure Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2124002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2124002</guid><dc:creator><![CDATA[Golfi1812]]></dc:creator><pubDate>Mon, 26 Sep 2011 17:59:49 GMT</pubDate></item><item><title><![CDATA[Reply to Lerre Token löschen on Mon, 26 Sep 2011 18:09:27 GMT]]></title><description><![CDATA[<p>In welcher Form speicherst du denn diese Token? (Ich würde dafür ja einen STL-Container wie std::vector&lt;&gt; oder std::list&lt;&gt; verwenden - dort kann man recht problemlos löschen oder umsortieren)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2124010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2124010</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 26 Sep 2011 18:09:27 GMT</pubDate></item><item><title><![CDATA[Reply to Lerre Token löschen on Mon, 26 Sep 2011 18:10:58 GMT]]></title><description><![CDATA[<p>ja, ich speichere sie in : vector&lt;Token&gt;tok;</p>
<p>Wie lösche /editiere ich dort die &quot;Stellplätze&quot; der einzelnen Token?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2124011</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2124011</guid><dc:creator><![CDATA[Golfi1812]]></dc:creator><pubDate>Mon, 26 Sep 2011 18:10:58 GMT</pubDate></item><item><title><![CDATA[Reply to Lerre Token löschen on Mon, 26 Sep 2011 18:24:15 GMT]]></title><description><![CDATA[<p>Du verwendest den Index im vector&lt;&gt; zum Zugriff (der beginnt übrigens bei 0) und kannst dann mit erase() Elemente löschen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2124022</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2124022</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 26 Sep 2011 18:24:15 GMT</pubDate></item><item><title><![CDATA[Reply to Lerre Token löschen on Mon, 26 Sep 2011 18:50:49 GMT]]></title><description><![CDATA[<p>--gelöscht...--</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2124035</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2124035</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 26 Sep 2011 18:50:49 GMT</pubDate></item><item><title><![CDATA[Reply to Lerre Token löschen on Mon, 26 Sep 2011 18:50:14 GMT]]></title><description><![CDATA[<p>Also konkret wäre das dann :</p>
<p>Ich möchte das 3te Token aus dem Container löschen:</p>
<pre><code class="language-cpp">erase(tok[3]);
</code></pre>
<p>Ist das so korrekt?<br />
Wass passiert mit dem tok[4] zum beispiel? Rutscht es dann auf die dritte Stelle?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2124036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2124036</guid><dc:creator><![CDATA[Golfi1812]]></dc:creator><pubDate>Mon, 26 Sep 2011 18:50:14 GMT</pubDate></item><item><title><![CDATA[Reply to Lerre Token löschen on Mon, 26 Sep 2011 19:03:08 GMT]]></title><description><![CDATA[<p>Nein, so ists falsch. Wie CStoll zwei posts weiter oben gesagt hat, fangen Array-Indizes bei 0 an, der 3 Token wäre demzufolge</p>
<pre><code class="language-cpp">tok.erase(tok.begin()+2);
</code></pre>
<p>Und ja, das 4. element rutscht nach vorn (Edit: Alle elemente hinter dem gelöschten rutschen einen nach vorn,<br />
Löschst du mehrere, rutscht es um die Anzahl der gelöschten nach vorn).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2124039</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2124039</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 26 Sep 2011 19:03:08 GMT</pubDate></item></channel></rss>