<?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[Schon wieder die Textausrichtung (Konsole)]]></title><description><![CDATA[<p>Also als erstes hoffe ich das der Name dieses mal etwas besser passt :p<br />
Also mein Problem ist, ich möchte gerne etwas in der Konsole ausgeben in etwa so:</p>
<pre><code>Name: Olaf                                   Name: Peter
Alter: 17                                    Alter: 97
</code></pre>
<p>Und mein Problem dabei ist, dass ich die zweite Spalte nicht gleichmäßig (unabhängig wie viel Text z.b. in der ersten Spalte bei Name oder Alter drinne steht) ausgerichtet bekomme.</p>
<p>Ich kann das Problem schwer erklären...</p>
<p>Hier nochmal etwas:</p>
<pre><code>Name: VölligEgalWieLangDerTextHierIstEsSoll  Name: Peter
Alter: ImmerAnDerGleichenStelleAnfangen      Alter: 97
</code></pre>
<p>Hier vom alten Thread der Link. (<a href="http://www.c-plusplus.net/forum/324377" rel="nofollow">http://www.c-plusplus.net/forum/324377</a>) Der Code von Belli ist zwar gut aber, es verstzt immer nur die erste Zeile und die danach nicht mehr...<br />
Ich hoffe Ihr konnt mir helfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/324503/schon-wieder-die-textausrichtung-konsole</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 08:40:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/324503.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Mar 2014 17:43:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Wed, 19 Mar 2014 17:45:25 GMT]]></title><description><![CDATA[<p>Also als erstes hoffe ich das der Name dieses mal etwas besser passt :p<br />
Also mein Problem ist, ich möchte gerne etwas in der Konsole ausgeben in etwa so:</p>
<pre><code>Name: Olaf                                   Name: Peter
Alter: 17                                    Alter: 97
</code></pre>
<p>Und mein Problem dabei ist, dass ich die zweite Spalte nicht gleichmäßig (unabhängig wie viel Text z.b. in der ersten Spalte bei Name oder Alter drinne steht) ausgerichtet bekomme.</p>
<p>Ich kann das Problem schwer erklären...</p>
<p>Hier nochmal etwas:</p>
<pre><code>Name: VölligEgalWieLangDerTextHierIstEsSoll  Name: Peter
Alter: ImmerAnDerGleichenStelleAnfangen      Alter: 97
</code></pre>
<p>Hier vom alten Thread der Link. (<a href="http://www.c-plusplus.net/forum/324377" rel="nofollow">http://www.c-plusplus.net/forum/324377</a>) Der Code von Belli ist zwar gut aber, es verstzt immer nur die erste Zeile und die danach nicht mehr...<br />
Ich hoffe Ihr konnt mir helfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389778</guid><dc:creator><![CDATA[Skeptar]]></dc:creator><pubDate>Wed, 19 Mar 2014 17:45:25 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Wed, 19 Mar 2014 17:45:22 GMT]]></title><description><![CDATA[<pre><code>std::cout &lt;&lt; &quot;Name: &quot; &lt;&lt; std::width(xx) &lt;&lt; name1 &lt;&lt; &quot;Name: &quot; &lt;&lt; name2;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2389779</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389779</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Wed, 19 Mar 2014 17:45:22 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Wed, 19 Mar 2014 17:54:09 GMT]]></title><description><![CDATA[<p>Fehlermeldung width() wurde in diesem Gültigkeitsbereich nicht definiert...<br />
Muss ich dafür etwas bestimmtes includieren?</p>
<p>Ihr braucht code <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<pre><code>#include &lt;iostream&gt;
#include &lt;conio.h&gt;
</code></pre>
<pre><code>if(g_hp &lt;= 0){
        g_hp=0;
        cout &lt;&lt; width(10) &lt;&lt; &quot;Name: &quot; &lt;&lt; g_name &lt;&lt; &quot;\n&quot;
             &lt;&lt; width(10) &lt;&lt; &quot;|          |\n&quot;
             &lt;&lt; width(10) &lt;&lt; &quot;Pokemon: &quot; &lt;&lt; g_pokemon &lt;&lt; &quot;\n&quot;
             &lt;&lt; width(10) &lt;&lt; &quot;HP: &quot; &lt;&lt; g_hp
             &lt;&lt; width(10) &lt;&lt; &quot;\n\n\nDu bist tot&quot;;
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2389782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389782</guid><dc:creator><![CDATA[Skeptar]]></dc:creator><pubDate>Wed, 19 Mar 2014 17:54:09 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Wed, 19 Mar 2014 18:08:46 GMT]]></title><description><![CDATA[<p>Sorry, mein Fehler:<br />
Das Ding heißt setw und du brauchst dafür iomanip.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389792</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Wed, 19 Mar 2014 18:08:46 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Wed, 19 Mar 2014 18:13:52 GMT]]></title><description><![CDATA[<p>Ja das habe ich auch schon ausprobiert, nur das Problem dabei ist, das es sich an dem letzten Zeichen davor orientiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389796</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389796</guid><dc:creator><![CDATA[Skeptar]]></dc:creator><pubDate>Wed, 19 Mar 2014 18:13:52 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Wed, 19 Mar 2014 22:13:38 GMT]]></title><description><![CDATA[<p>Skeptar schrieb:</p>
<blockquote>
<p>Der Code von Belli ist zwar gut aber, es verstzt immer nur die erste Zeile und die danach nicht mehr...<br />
Ich hoffe Ihr konnt mir helfen.</p>
</blockquote>
<p>Du musst einfach vor <strong>jeder</strong> Ausgabe den Cursor dahin positionieren, wo Du hin willst. Die nötige Funktion habe ich Dir glaube ich schon gegeben?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389854</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 19 Mar 2014 22:13:38 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Thu, 20 Mar 2014 16:21:54 GMT]]></title><description><![CDATA[<p>Ist ja gut...<br />
Den Code habe ich schon und der funktioniert auch aber, ich dachte das geht einfacher aber trodzdem danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389979</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389979</guid><dc:creator><![CDATA[Skeptar]]></dc:creator><pubDate>Thu, 20 Mar 2014 16:21:54 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Thu, 20 Mar 2014 19:04:15 GMT]]></title><description><![CDATA[<p>(Vorsicht, Anfänger!)</p>
<p>Würde das nicht auch mit '\t' funktionieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2390023</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2390023</guid><dc:creator><![CDATA[Stocker34]]></dc:creator><pubDate>Thu, 20 Mar 2014 19:04:15 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Fri, 21 Mar 2014 09:43:33 GMT]]></title><description><![CDATA[<p>Stocker34 schrieb:</p>
<blockquote>
<p>(Vorsicht, Anfänger!)</p>
<p>Würde das nicht auch mit '\t' funktionieren?</p>
</blockquote>
<p>Nein, weil '\t' immer bis zum nächsten Tab-Stopp springt. Wenn davor ein kurzer Text steht könnte das Spalte 9 sein, wenn davor aber ein langer Text steht aber Spalte 21.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2390156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2390156</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Fri, 21 Mar 2014 09:43:33 GMT</pubDate></item><item><title><![CDATA[Reply to Schon wieder die Textausrichtung (Konsole) on Fri, 21 Mar 2014 10:24:18 GMT]]></title><description><![CDATA[<p>Ah, okay. Danke, wieder was gelernt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2390164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2390164</guid><dc:creator><![CDATA[Stocker34]]></dc:creator><pubDate>Fri, 21 Mar 2014 10:24:18 GMT</pubDate></item></channel></rss>