<?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[vector erweitern]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich arbeite mit vector Befehle.</p>
<p>in der *.h</p>
<pre><code class="language-cpp">vector&lt;int&gt; viLabelTop;
</code></pre>
<p>in der *.cpp</p>
<pre><code class="language-cpp">viLabelTop.resize(10);
</code></pre>
<p>was muß ich tun, wenn die Kapazität des vectors nicht mehr ausreicht, um diese zu erhöhen ?</p>
<p>Gruß Siegfried</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/112890/vector-erweitern</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 03:40:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/112890.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Jun 2005 10:53:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 10:53:13 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich arbeite mit vector Befehle.</p>
<p>in der *.h</p>
<pre><code class="language-cpp">vector&lt;int&gt; viLabelTop;
</code></pre>
<p>in der *.cpp</p>
<pre><code class="language-cpp">viLabelTop.resize(10);
</code></pre>
<p>was muß ich tun, wenn die Kapazität des vectors nicht mehr ausreicht, um diese zu erhöhen ?</p>
<p>Gruß Siegfried</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811062</guid><dc:creator><![CDATA[Beppo]]></dc:creator><pubDate>Fri, 17 Jun 2005 10:53:13 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 10:56:23 GMT]]></title><description><![CDATA[<p>ein weiteres resize müsste es tun.<br />
aber ich versteh nicht wieso du die größe beschrenken willst, wenn du sie eh überschreitest.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811065</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811065</guid><dc:creator><![CDATA[NämenLösle]]></dc:creator><pubDate>Fri, 17 Jun 2005 10:56:23 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 11:00:27 GMT]]></title><description><![CDATA[<p>Wenn du deine Daten mit push_back() anfügst erhöht sich die Kapazität automatisch. Ansonsten gibt es noch reserve(). Wie wärs, wenn du dir einfach mal die Hilfe zu std::vector sowie den genannten Funktionen anschaust.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811066</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 17 Jun 2005 11:00:27 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 10:57:57 GMT]]></title><description><![CDATA[<p>Das Prinzip von den STL-Container kennst du? std::vector kann theoretisch soweit wachsen bis der Speicher ausgeht. Wenn du weiter einfügen willst, einfach std::vector::push_back() benutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811067</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811067</guid><dc:creator><![CDATA[PuppetMaster2k]]></dc:creator><pubDate>Fri, 17 Jun 2005 10:57:57 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 11:05:43 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Die Größe des Speicher wird durch das Programm bestimmt.</p>
<p>mit resize kann ich den vector erweitern, hat aber den Nachteil, das der vorhandene Inhalt verloren geht. Deshalb suche ich eine andere Lösung.</p>
<p>STL-Container kenne ich noch nicht.<br />
kannst du mir etwas genauer deine Methode erklären ?</p>
<p>Gruß Siegfried</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811074</guid><dc:creator><![CDATA[Beppo]]></dc:creator><pubDate>Fri, 17 Jun 2005 11:05:43 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 11:10:49 GMT]]></title><description><![CDATA[<p>Lies dir doch mal diesen FAQ-Beitrag aus dem C++-Forum durch. Hier unter anderen auch um std::vector.<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39460.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-39460.html</a><br />
Vielleicht zeigst du uns auch mal einen kurzen Codeausschnitt von dir wo du deinen Vector verwendest. An einem praktischen Beispiel läßt sich das leichter zeigen.<br />
PS: Achso vector ist ein STL-Container.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811076</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811076</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 17 Jun 2005 11:10:49 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 11:17:19 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Bin noch am aufbau meiner Code. Habe den Link gelesen.<br />
Ich habe eine Frage: pop_back() oder push_back() ?</p>
<p>hier eine Zeile aus dem Link.<br />
Dabei kann ich also mit der Methoder pop_back ein Element am Ende anhängen und mit push_back wieder von Ende entfernen.</p>
<p>Gruß Siegfried</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811082</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811082</guid><dc:creator><![CDATA[Beppo]]></dc:creator><pubDate>Fri, 17 Jun 2005 11:17:19 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 11:23:29 GMT]]></title><description><![CDATA[<p>Genau umgekehrt.</p>
<p>Zitat aus der BCB-Hilfe</p>
<blockquote>
<p>void<br />
pop_back();</p>
<p>Removes the last element of self.</p>
<p>void<br />
push_back(const T&amp; x);</p>
<p>Inserts a copy of x to the end of self.</p>
<p>void<br />
reserve(size_type n);</p>
<p>Increases the capacity of self in anticipation of adding new elements. reserve itself does not add any new elements. After a call to reserve, capacity() is greater than or equal to n and subsequent insertions will not cause a reallocation until the size of the vector exceeds n. Reallocation does not occur if n is less than capacity(). If reallocation does occur, then all iterators and references pointing to elements in the vector are invalidated. reserve takes at most linear time in the size of self. reserve throws a length_error exception if n is greater than max_size().</p>
</blockquote>
<p>Schau aber lieber mal selber rein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811084</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 17 Jun 2005 11:23:29 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 11:30:06 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>also pop_back() ! mir ist aus asm noch bekannt, das man mit pop einen wert auf dem Speicher hinzufügt.</p>
<p>danke für alle Infos.</p>
<p>Gruß Siegfried</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811089</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811089</guid><dc:creator><![CDATA[Beppo]]></dc:creator><pubDate>Fri, 17 Jun 2005 11:30:06 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 12:18:07 GMT]]></title><description><![CDATA[<p>Beppo schrieb:</p>
<blockquote>
<p>Hallo,</p>
<p>also pop_back() ! mir ist aus asm noch bekannt, das man mit pop einen wert auf dem Speicher hinzufügt</p>
</blockquote>
<p>Falsch! push_back fügt hinzu, pop_back entfernt! Wer lesen kann ist klar im Vorteil!</p>
<blockquote>
<p>void<br />
<strong>pop_back();</strong></p>
<p><strong>Removes</strong> the last element of self.</p>
<p>void<br />
<strong>push_back</strong>(const T&amp; x);</p>
<p><strong>Inserts</strong> a copy of x to the end of self.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/811138</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811138</guid><dc:creator><![CDATA[PuppetMaster2k]]></dc:creator><pubDate>Fri, 17 Jun 2005 12:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 12:51:32 GMT]]></title><description><![CDATA[<p>Soviel ich weiß war das auch bei ASM so.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811172</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811172</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 17 Jun 2005 12:51:32 GMT</pubDate></item><item><title><![CDATA[Reply to vector erweitern on Fri, 17 Jun 2005 13:53:32 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>endlich habe ich diese verstanden.<br />
Danke an alle.</p>
<p>Gruß Siegfried</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811229</guid><dc:creator><![CDATA[Beppo]]></dc:creator><pubDate>Fri, 17 Jun 2005 13:53:32 GMT</pubDate></item></channel></rss>