<?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,<br />
ganze kurze frage:</p>
<p>std::vector<a href="std::string" rel="nofollow">std::string</a> MessageList<br />
std::vector<a href="std::string" rel="nofollow">std::string</a> TitleList</p>
<p>finden beide in meinem Code Platz.<br />
Jedoch laufen sie nur einzeln und nicht zusammen, wieso?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171982/std-vector</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 14:51:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171982.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Jan 2007 10:46:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 10:46:49 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ganze kurze frage:</p>
<p>std::vector<a href="std::string" rel="nofollow">std::string</a> MessageList<br />
std::vector<a href="std::string" rel="nofollow">std::string</a> TitleList</p>
<p>finden beide in meinem Code Platz.<br />
Jedoch laufen sie nur einzeln und nicht zusammen, wieso?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220383</guid><dc:creator><![CDATA[Puhbär11]]></dc:creator><pubDate>Wed, 31 Jan 2007 10:46:49 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 10:49:37 GMT]]></title><description><![CDATA[<p>Puhbär11 schrieb:</p>
<blockquote>
<p>Hallo,<br />
ganze kurze frage:</p>
<p>std::vector<a href="std::string" rel="nofollow">std::string</a> MessageList<br />
std::vector<a href="std::string" rel="nofollow">std::string</a> TitleList</p>
<p>finden beide in meinem Code Platz.<br />
Jedoch laufen sie nur einzeln und nicht zusammen, wieso?</p>
</blockquote>
<p>?? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>vielleicht können sie sich nicht leiden?<br />
Sorry, aber ich hab keine ahnung was du meinst!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220385</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220385</guid><dc:creator><![CDATA[ser1al_ausgeloggt]]></dc:creator><pubDate>Wed, 31 Jan 2007 10:49:37 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 10:50:04 GMT]]></title><description><![CDATA[<p>Geht das auch auf Deutsch? Was hast du und was willst du damit erreichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220386</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 31 Jan 2007 10:50:04 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 11:03:41 GMT]]></title><description><![CDATA[<p>Also nochmal, ich habe ungefähr null Plan von C++,<br />
mache sonst auch nur C.<br />
Jedenfalls hab ich mir einen Code geschrieben wie ich eine Art &quot;Array&quot; brauche.<br />
Dafür habe ich</p>
<p>std::vector<a href="std::string" rel="nofollow">std::string</a> MessageList</p>
<p>genutzt, weil ich gehört habe das soll sowas ähnliches sein!?!!?</p>
<p>Nun habe ich &quot;MessageList&quot; gefüllt mit Messages ;).<br />
Dazu kommt noch</p>
<p>std::vector<a href="std::string" rel="nofollow">std::string</a> MessageList</p>
<p>befüllt mit ........................Titles!!!<br />
So, dann nutze ich die Funktion find:</p>
<p>if(std::find(MessageList.begin(), MessageList.end(), msg) == MessageList.end())<br />
{<br />
std::cout&lt;&lt; blablubbli<br />
MessageList.push_back(msg);<br />
}</p>
<p>und genau das selbe für TitleList.<br />
Wenn ich das Prog dann ausführe gibts diesen Fehler:</p>
<p>---------------------------<br />
stanag.exe - Fehler in Anwendung<br />
---------------------------<br />
Die Anweisung in &quot;0x00402d7c&quot; verweist auf Speicher in &quot;0x00000000&quot;. Der Vorgang</p>
<p>&quot;read&quot; konnte nicht auf dem Speicher durchgeführt werden.</p>
<p>Klicken Sie auf &quot;OK&quot;, um das Programm zu beenden.<br />
Klicken Sie auf &quot;Abbrechen&quot;, um das Programm zu debuggen.<br />
---------------------------<br />
OK Abbrechen<br />
---------------------------</p>
<p>WIESO?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220393</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220393</guid><dc:creator><![CDATA[Puhbär11]]></dc:creator><pubDate>Wed, 31 Jan 2007 11:03:41 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 11:06:46 GMT]]></title><description><![CDATA[<p>Und sollen wir uns aus den Fragmenten jetzt etwas zusammenraten? Zeig mal bitte ein compilierbares Beispielprogramm, in dem der Fehler auftritt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220396</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 31 Jan 2007 11:06:46 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 11:29:05 GMT]]></title><description><![CDATA[<p>&quot;msg&quot; ist nicht zufällig ein Zeiger auf char mit dem Wert (Adresse) &quot;0x00000000&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220406</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Wed, 31 Jan 2007 11:29:05 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 12:24:49 GMT]]></title><description><![CDATA[<p>Puhbär11 schrieb:</p>
<blockquote>
<p>Also nochmal, ich habe ungefähr null Plan von C++,...</p>
</blockquote>
<p>Ich glaube, das solltest Du ändern, wenn Du C++ nutzen willst. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<pre><code class="language-cpp">...
if(std::find(MessageList.begin(), MessageList.end(), msg) == MessageList.end())
{
      std::cout&lt;&lt; blablubbli
      MessageList.push_back(msg);
}
...
</code></pre>
<p>Sieht aus, als ob Du mit einer std::set besser bedient wärst als mit einem std::vector. Set sorgt schon von sich aus dafür, dass jeder Wert nur einmal vorkommt...</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220435</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220435</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Wed, 31 Jan 2007 12:24:49 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 12:35:27 GMT]]></title><description><![CDATA[<p>Simon2 schrieb:</p>
<blockquote>
<p>Sieht aus, als ob Du mit einer std::set besser bedient wärst als mit einem std::vector.</p>
</blockquote>
<p>Nicht wenn's eine Liste sein soll <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220442</guid><dc:creator><![CDATA[finix]]></dc:creator><pubDate>Wed, 31 Jan 2007 12:35:27 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 12:47:35 GMT]]></title><description><![CDATA[<p>finix schrieb:</p>
<blockquote>
<p>Simon2 schrieb:</p>
<blockquote>
<p>Sieht aus, als ob Du mit einer std::set besser bedient wärst als mit einem std::vector.</p>
</blockquote>
<p>Nicht wenn's eine Liste sein soll <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Der Hinweis auf &quot;Liste&quot; ist allerdings nur im Variablennamen versteckt, während die Eindeutigkeit beim Einfügen in Code gegossen wurde ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Aber stimmt schon: Je besser er die diversen Container kennt, desto gezielter kann er seine Anforderungen bestimmen und umsetzen (vielleicht will er ja &quot;map&quot;-artig noch MSG-IDs vergeben ?).</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220447</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Wed, 31 Jan 2007 12:47:35 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector on Wed, 31 Jan 2007 13:19:44 GMT]]></title><description><![CDATA[<p>Simon2 schrieb:</p>
<blockquote>
<p>Der Hinweis auf &quot;Liste&quot; ist allerdings nur im Variablennamen versteckt, während die Eindeutigkeit beim Einfügen in Code gegossen wurde ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Noch viel schlimmer, er nutzt <code>std::vector</code> statt <code>std::list</code> . Das alles verhindert aber nicht dass es sich konzeptionell um eine Liste mit einzigartigen Elementen handeln kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220472</guid><dc:creator><![CDATA[finix]]></dc:creator><pubDate>Wed, 31 Jan 2007 13:19:44 GMT</pubDate></item></channel></rss>