<?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[Problem mit vector&amp;lt;&amp;gt;]]></title><description><![CDATA[<p>Hi Community <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ich habe ein Problem, ich poste zuerst aber mal den Code<br />
(Das ist nur ein Beispiel Code, später sol ldas über 2 Funktionen verteilt sein, deswegen nicht wurden wenn der Code &quot;unlogisch&quot; ist)</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;vector&gt;

struct MENUITEM {
    std::string menuItemTxt;
    int ct_Basic;
    int ct_Over;
    // int         menuItemID;
};

int main() {

	MENUITEM tmp;
	std::vector&lt;MENUITEM&gt; data;
	// std::vector&lt;MENUITEM&gt;::iterator it;
	tmp.ct_Basic = 1;
	tmp.ct_Over = 2;
	tmp.menuItemTxt = &quot;hallo&quot;;

	data.push_back(tmp);  // bis hierhin ist noch alles ok

	std::cin.get();
	return 0;
}
</code></pre>
<p>Also ich habe eine Struktur und dessen Werte möchte ich in einem Vektor speicheren, das Problem ist ich bekomm die Werte nicht mehr raus? Also ich hab keine Ahnung wie ich wieder an die einzelenen Daten der Struktur komme, hab ich da was falsch gemacht oder falsch verstanden?</p>
<p>Wäre froh für jede Hilfe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>lg c4f</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/219019/problem-mit-vector-lt-gt</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 15:10:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/219019.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Jul 2008 18:28:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit vector&amp;lt;&amp;gt; on Mon, 28 Jul 2008 18:28:08 GMT]]></title><description><![CDATA[<p>Hi Community <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ich habe ein Problem, ich poste zuerst aber mal den Code<br />
(Das ist nur ein Beispiel Code, später sol ldas über 2 Funktionen verteilt sein, deswegen nicht wurden wenn der Code &quot;unlogisch&quot; ist)</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;vector&gt;

struct MENUITEM {
    std::string menuItemTxt;
    int ct_Basic;
    int ct_Over;
    // int         menuItemID;
};

int main() {

	MENUITEM tmp;
	std::vector&lt;MENUITEM&gt; data;
	// std::vector&lt;MENUITEM&gt;::iterator it;
	tmp.ct_Basic = 1;
	tmp.ct_Over = 2;
	tmp.menuItemTxt = &quot;hallo&quot;;

	data.push_back(tmp);  // bis hierhin ist noch alles ok

	std::cin.get();
	return 0;
}
</code></pre>
<p>Also ich habe eine Struktur und dessen Werte möchte ich in einem Vektor speicheren, das Problem ist ich bekomm die Werte nicht mehr raus? Also ich hab keine Ahnung wie ich wieder an die einzelenen Daten der Struktur komme, hab ich da was falsch gemacht oder falsch verstanden?</p>
<p>Wäre froh für jede Hilfe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>lg c4f</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1555209</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1555209</guid><dc:creator><![CDATA[c4f]]></dc:creator><pubDate>Mon, 28 Jul 2008 18:28:08 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit vector&amp;lt;&amp;gt; on Mon, 28 Jul 2008 18:32:39 GMT]]></title><description><![CDATA[<p>Also wenn es bereits daran scheitert, dann empfehle ich dir mal die folgenden drei Artikel zu lesen:<br />
<a href="http://magazin.c-plusplus.net/artikel/Aufbau%20der%20STL%20-%20Teil%201%3A%20Container" rel="nofollow">Aufbau der STL (Teil 1)</a><br />
<a href="http://magazin.c-plusplus.net/artikel/Aufbau%20der%20STL%20-%20Teil%202%3A%20Iteratoren%20und%20Algorithmen" rel="nofollow">Aufbau der STL (Teil 2)</a><br />
<a href="http://magazin.c-plusplus.net/artikel/Aufbau%20der%20STL%20-%20Teil%203%3A%20Hilfsklassen%20und%20Erweiterungen" rel="nofollow">Aufbau der STL (Teil 3)</a></p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1555212</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1555212</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Mon, 28 Jul 2008 18:32:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit vector&amp;lt;&amp;gt; on Mon, 28 Jul 2008 18:35:00 GMT]]></title><description><![CDATA[<p>Dravere schrieb:</p>
<blockquote>
<p>Also wenn es bereits daran scheitert, dann empfehle ich dir mal die folgenden drei Artikel zu lesen:<br />
<a href="http://magazin.c-plusplus.net/artikel/Aufbau%20der%20STL%20-%20Teil%201%3A%20Container" rel="nofollow">Aufbau der STL (Teil 1)</a><br />
<a href="http://magazin.c-plusplus.net/artikel/Aufbau%20der%20STL%20-%20Teil%202%3A%20Iteratoren%20und%20Algorithmen" rel="nofollow">Aufbau der STL (Teil 2)</a><br />
<a href="http://magazin.c-plusplus.net/artikel/Aufbau%20der%20STL%20-%20Teil%203%3A%20Hilfsklassen%20und%20Erweiterungen" rel="nofollow">Aufbau der STL (Teil 3)</a></p>
<p>Grüssli</p>
</blockquote>
<p>Danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ich gebe zu dass ich mich mit vector und co. nicht wirklich auskenn...danke dir für die Tuts <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
<p>lg c4f</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1555216</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1555216</guid><dc:creator><![CDATA[c4f]]></dc:creator><pubDate>Mon, 28 Jul 2008 18:35:00 GMT</pubDate></item></channel></rss>