<?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[&amp;quot;iwas&amp;quot; += intwert  --&amp;gt; Name eines Strings]]></title><description><![CDATA[<p>Sorry Doppelpost , hab ich leider nicht bemerkt.<br />
Bitte löschen</p>
<p>Hallo,<br />
ich möchte das der Benutzer eine Zahl eingibt (z.B. 1,2,3,4,5...).<br />
Also habe ich einen Int-Wert.<br />
Nun soll ein String der z.B. String1(2,3,4,5,6,7,8,9) heißt ausgegeben werden.<br />
Meine Idee:</p>
<p>&quot;String&quot; + die jeweilige Zahl ergibt den Namen des Strings der ausgeben wird.</p>
<p>Ich hatte zuerst das hier:</p>
<pre><code class="language-cpp">switch(Int-Wert){
		case 1:
   cout &lt;&lt; String1 &lt;&lt; endl;
   break;
		case 2:
   cout &lt;&lt; String2 &lt;&lt; endl;
    break;
		case 3:
   cout &lt;&lt; String3 &lt;&lt; endl;
    break;
	}
</code></pre>
<p>ich finde das allerdings bei der Menge an Strings die Ich habe ziemlich umständlich. Deshalb suche ich nach einer anderen Möglichkeit.</p>
<p>mfg<br />
Summernoon</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/215642/quot-iwas-quot-intwert-gt-name-eines-strings</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 03:18:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/215642.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Jun 2008 15:13:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &amp;quot;iwas&amp;quot; += intwert  --&amp;gt; Name eines Strings on Fri, 13 Jun 2008 15:30:53 GMT]]></title><description><![CDATA[<p>Sorry Doppelpost , hab ich leider nicht bemerkt.<br />
Bitte löschen</p>
<p>Hallo,<br />
ich möchte das der Benutzer eine Zahl eingibt (z.B. 1,2,3,4,5...).<br />
Also habe ich einen Int-Wert.<br />
Nun soll ein String der z.B. String1(2,3,4,5,6,7,8,9) heißt ausgegeben werden.<br />
Meine Idee:</p>
<p>&quot;String&quot; + die jeweilige Zahl ergibt den Namen des Strings der ausgeben wird.</p>
<p>Ich hatte zuerst das hier:</p>
<pre><code class="language-cpp">switch(Int-Wert){
		case 1:
   cout &lt;&lt; String1 &lt;&lt; endl;
   break;
		case 2:
   cout &lt;&lt; String2 &lt;&lt; endl;
    break;
		case 3:
   cout &lt;&lt; String3 &lt;&lt; endl;
    break;
	}
</code></pre>
<p>ich finde das allerdings bei der Menge an Strings die Ich habe ziemlich umständlich. Deshalb suche ich nach einer anderen Möglichkeit.</p>
<p>mfg<br />
Summernoon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1528483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1528483</guid><dc:creator><![CDATA[Summernoon]]></dc:creator><pubDate>Fri, 13 Jun 2008 15:30:53 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;iwas&amp;quot; += intwert  --&amp;gt; Name eines Strings on Fri, 13 Jun 2008 15:16:35 GMT]]></title><description><![CDATA[<p>Also wenn die Zahlen schön in einer Reihe sind, kannst du ja einen std::vector<a href="std::string" rel="nofollow">std::string</a> machen und dann einfach per Operator [] ausgeben lassen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1528487</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1528487</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Fri, 13 Jun 2008 15:16:35 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;iwas&amp;quot; += intwert  --&amp;gt; Name eines Strings on Fri, 13 Jun 2008 15:18:39 GMT]]></title><description><![CDATA[<p>Summernoon schrieb:</p>
<blockquote>
<p>ich finde das allerdings bei der Menge an Strings die Ich habe ziemlich umständlich. Deshalb suche ich nach einer anderen Möglichkeit.</p>
</blockquote>
<p>Schau dir mal die std::map an. Das ist eine Containerklasse mit einem Schlüssel/Wert-Paar, bei dir wäre es wohl std::map&lt;int, std::string&gt;...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1528491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1528491</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Fri, 13 Jun 2008 15:18:39 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;iwas&amp;quot; += intwert  --&amp;gt; Name eines Strings on Fri, 13 Jun 2008 15:28:17 GMT]]></title><description><![CDATA[<p>Doppelpost, Link <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-215644-and-highlight-is-.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-215644-and-highlight-is-.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1528504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1528504</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Fri, 13 Jun 2008 15:28:17 GMT</pubDate></item></channel></rss>