<?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[Zahlen zeichen zuordnen]]></title><description><![CDATA[<p>Ich würde gerne einer zahl ein teichen zu weisen.<br />
zum bei spiel wenn sowas steht=</p>
<pre><code class="language-cpp">cout&lt;&lt;1; z.b A
</code></pre>
<p>hat jemand eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/123050/zahlen-zeichen-zuordnen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 10:34:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/123050.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Oct 2005 13:58:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 13:58:43 GMT]]></title><description><![CDATA[<p>Ich würde gerne einer zahl ein teichen zu weisen.<br />
zum bei spiel wenn sowas steht=</p>
<pre><code class="language-cpp">cout&lt;&lt;1; z.b A
</code></pre>
<p>hat jemand eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890665</guid><dc:creator><![CDATA[Stefan311]]></dc:creator><pubDate>Wed, 12 Oct 2005 13:58:43 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 13:59:40 GMT]]></title><description><![CDATA[<p>verwende doch einfach char, das wird als (ASCII)-Zeichen ausgegeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890666</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890666</guid><dc:creator><![CDATA[CS]]></dc:creator><pubDate>Wed, 12 Oct 2005 13:59:40 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 14:01:13 GMT]]></title><description><![CDATA[<p>Stefan311 schrieb:</p>
<blockquote>
<p>Ich würde gerne einer zahl ein teichen zu weisen.<br />
zum bei spiel wenn sowas steht=</p>
<pre><code class="language-cpp">cout&lt;&lt;1; z.b A
</code></pre>
<p>hat jemand eine Idee?</p>
</blockquote>
<p>Also btw: Einer Konstanten kannst du nichts Zuweisen...<br />
Außerdem hab ich dein Beispiel nicht ganz verstanden <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>Gruß Caipi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890670</guid><dc:creator><![CDATA[Caipi]]></dc:creator><pubDate>Wed, 12 Oct 2005 14:01:13 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 14:19:02 GMT]]></title><description><![CDATA[<p>ich meine es so.<br />
Quelltext</p>
<pre><code class="language-cpp">cout&lt;&lt;1;
</code></pre>
<p>Und die ausgabe sollte dann A sein.<br />
Ich habs so probiert aber es klaapt nicht:<br />
1='A';</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890697</guid><dc:creator><![CDATA[Stefan311]]></dc:creator><pubDate>Wed, 12 Oct 2005 14:19:02 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 14:23:09 GMT]]></title><description><![CDATA[<p>Caipi schrieb:</p>
<blockquote>
<p>Also btw: Einer Konstanten kannst du nichts Zuweisen...</p>
</blockquote>
<p>...</p>
<p>Was willst du denn machen? Für mich klingt das nach einem Design-Fehler.</p>
<p>Gruß Caipi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890704</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890704</guid><dc:creator><![CDATA[Caipi]]></dc:creator><pubDate>Wed, 12 Oct 2005 14:23:09 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 14:23:52 GMT]]></title><description><![CDATA[<p>1 ist eine Konstante, der kannst du nichts zuweisen <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>versuch' mal</p>
<pre><code class="language-cpp">cout &lt;&lt; 'A';
</code></pre>
<p>oder</p>
<pre><code class="language-cpp">char i='A';
cout &lt;&lt; i;
</code></pre>
<p>Was genau hast du eigentlich am Ende mit deiner 1 vs. 'A' Überlegung vor?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890705</guid><dc:creator><![CDATA[CS]]></dc:creator><pubDate>Wed, 12 Oct 2005 14:23:52 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 17:41:36 GMT]]></title><description><![CDATA[<p>Ich dachte man könnte mit einem array eine art Karte zeichen.Ich dachte dafür habe ich ja 9 werte.die könnte ich ja abspeichern. Dadurch könnte man neue Karten machen.Quasie nen Karten editor dazu. Aber zeichen einer zahl geben dachte ich könnte ich hier fragen. Ich glaube mir ist jetzt was eingefallen wie kann man define wieder weg machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890839</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890839</guid><dc:creator><![CDATA[Stefan311]]></dc:creator><pubDate>Wed, 12 Oct 2005 17:41:36 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 18:29:45 GMT]]></title><description><![CDATA[<p>Warum schreibst du keine Zuordnungsfunktion?<br />
cout &lt;&lt; transform(1) &lt;&lt; transform(2) &lt;&lt; transform(3) &lt;&lt; transform(4) &lt;&lt; endl;<br />
und auf dem bildschirm kommt<br />
AGTW</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890870</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890870</guid><dc:creator><![CDATA[imhotep]]></dc:creator><pubDate>Wed, 12 Oct 2005 18:29:45 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Wed, 12 Oct 2005 19:10:44 GMT]]></title><description><![CDATA[<p>Stefan311 schrieb:</p>
<blockquote>
<p>wie kann man define wieder weg machen?</p>
</blockquote>
<p>Mittels #undef, bringt dir aber nichts. Und selbst wenn es funktionieren würde wäre es keine gute Idee.</p>
<p>Zu deinem Problem:</p>
<pre><code class="language-cpp">#include &lt;map&gt;

std::map&lt;int, char&gt; tiles;
</code></pre>
<p><a href="http://www.sgi.com/tech/stl/Map.html" rel="nofollow">std::map&lt;...&gt;</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/890885</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890885</guid><dc:creator><![CDATA[finix]]></dc:creator><pubDate>Wed, 12 Oct 2005 19:10:44 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 07:30:09 GMT]]></title><description><![CDATA[<p>Oder, wenn deine verwendeten Grundwerte konstant sind, reicht auch schon ein char[] für die Aufgabe (in manchen Fällen ist map&lt;&gt; einfach Overkill ;))</p>
<pre><code class="language-cpp">const char[] tiles = &quot;ABCDEFG&quot;;
//...
cout &lt;&lt; tiles[i];
</code></pre>
<p>(Achtung, der Indes beginnt bei Null)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891074</guid><dc:creator><![CDATA[CS]]></dc:creator><pubDate>Thu, 13 Oct 2005 07:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 10:29:53 GMT]]></title><description><![CDATA[<p>CS schrieb:</p>
<blockquote>
<p>Oder, wenn deine verwendeten Grundwerte konstant sind, reicht auch schon ein char[] für die Aufgabe (in manchen Fällen ist map&lt;&gt; einfach Overkill ;))</p>
</blockquote>
<p>Hatte ich mir im Prinzip auch gedacht, ist aber deutlich flexibler - und deiner Lösung fehlt <em>mindestens</em> noch ein</p>
<pre><code class="language-cpp">enum {
  TILE_A,
  TILE_B,
  // ...
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/891219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891219</guid><dc:creator><![CDATA[finix]]></dc:creator><pubDate>Thu, 13 Oct 2005 10:29:53 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 11:11:10 GMT]]></title><description><![CDATA[<p>&lt;ironie&gt;</p>
<pre><code class="language-cpp">#define 1 A
</code></pre>
<p>&lt;/ironie&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891263</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Thu, 13 Oct 2005 11:11:10 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 12:20:02 GMT]]></title><description><![CDATA[<p>phlox81 schrieb:</p>
<blockquote>
<p>&lt;ironie&gt;</p>
<pre><code class="language-cpp">#define 1 A
</code></pre>
<p>&lt;/ironie&gt;</p>
</blockquote>
<p>Sieht für mich aus wie ein Kandidat für <a href="http://www.thedailywtf.com" rel="nofollow">www.thedailywtf.com</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/891317</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891317</guid><dc:creator><![CDATA[imhotep]]></dc:creator><pubDate>Thu, 13 Oct 2005 12:20:02 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 13:31:47 GMT]]></title><description><![CDATA[<p>Ich schätze man hat mich falsch verstanden.<br />
Folgendes ein 2d array der so ausieh:</p>
<pre><code class="language-cpp">0,0,0,0,2,0,0,0,0,0,
0,0,0,2,0,0,0,0,0,0,
0,0,1,4,4,4,4,4,4,4,
0,0,0,3,0,0,0,0,0,0,
0,0,0,0,3,0,0,0,0,0,//so siehts im array aus.
</code></pre>
<p>Und in der ausgabe solls dann so aussehen:</p>
<pre><code class="language-cpp">ausgabe in konsole:
 , , , ,/, , , , , ,
 , , ,/, , , , , , ,
 , ,|,#,#,#,#,#,#,#,
 , , ,\, , , , , , ,
 , , , ,\, , , , , ,//hier sind die kommer nur zum trennen der
</code></pre>
<p>//zeichen da.nicht in der ausgabe.</p>
<p>Und jetzt meine ich das so<br />
0=' '<br />
1='|'<br />
2='/'<br />
3='\'<br />
4='#'<br />
so könnte ich eine karte zeichnen dafür müsste ich wissen wie ich zahlen zeichen<br />
zuordne.define klappt nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891383</guid><dc:creator><![CDATA[Stefan311]]></dc:creator><pubDate>Thu, 13 Oct 2005 13:31:47 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 13:33:34 GMT]]></title><description><![CDATA[<p>CS schrieb:</p>
<blockquote>
<p>Oder, wenn deine verwendeten Grundwerte konstant sind, reicht auch schon ein char[] für die Aufgabe (in manchen Fällen ist map&lt;&gt; einfach Overkill ;))</p>
<pre><code class="language-cpp">const char[] tiles = &quot;ABCDEFG&quot;;
//...
cout &lt;&lt; tiles[i];
</code></pre>
<p>(Achtung, der Indes beginnt bei Null)</p>
</blockquote>
<p>Nimm doch einfach diesen Vorschlag, deine Lösung die 0 oder 1 zu überschreiben ist Unfug!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891387</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891387</guid><dc:creator><![CDATA[Cpt_Future]]></dc:creator><pubDate>Thu, 13 Oct 2005 13:33:34 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 13:34:34 GMT]]></title><description><![CDATA[<p>Dann würde ich einen Transform-Funktion machen, der du die codierte Zeile übergibst und die dir eine decodierte zurückliefert. Oder du gibts ihr das array und sie macht für dich die Ausgabe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891388</guid><dc:creator><![CDATA[imhotep]]></dc:creator><pubDate>Thu, 13 Oct 2005 13:34:34 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 13:43:31 GMT]]></title><description><![CDATA[<p>Also ihr meint jetzt denn array direkt mit denn zeichen zu füllen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891401</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891401</guid><dc:creator><![CDATA[Stefan311]]></dc:creator><pubDate>Thu, 13 Oct 2005 13:43:31 GMT</pubDate></item><item><title><![CDATA[Reply to Zahlen zeichen zuordnen on Thu, 13 Oct 2005 14:38:16 GMT]]></title><description><![CDATA[<p>Ja, wenn du nicht einen trifftigen Grund hast es nicht zu tun</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891459</guid><dc:creator><![CDATA[imhotep]]></dc:creator><pubDate>Thu, 13 Oct 2005 14:38:16 GMT</pubDate></item></channel></rss>