<?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[char Arrays]]></title><description><![CDATA[<p>Ich habe folgenbdes Problem:</p>
<p>Ich möchte gerne meinen Vornamen und Nachnamen eingeben<br />
und der Cpmpiler soll mir den ganzen Namen ausspucken.<br />
Ich habe aber nicht gefunden, wie man so etwas bewekstelligt.</p>
<p>Hier ein Beispiel:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include&lt;conio.h&gt;
using namespace std;

int main()
{
    char name [15] = &quot;Max Mustermann&quot;;

    cout&lt;&lt;name&lt;&lt;endl;
    getch();
}
</code></pre>
<p>Jetzt möchte ich meinen eigenen Name eingeben und der Compiler soll ihn<br />
mir ausgeben. Es soll auch egal sein, wie lang der Name ist.<br />
Es sollen nur Leerzeichen und 2 Wörter vorhanden sein (Max Mustermann) !</p>
<p>Kann mir jemand helfen ?<br />
Vielen Dank im Voraus und LG Flo</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/266728/char-arrays</link><generator>RSS for Node</generator><lastBuildDate>Wed, 02 Sep 2026 23:42:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/266728.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 May 2010 11:02:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to char Arrays on Thu, 13 May 2010 11:02:44 GMT]]></title><description><![CDATA[<p>Ich habe folgenbdes Problem:</p>
<p>Ich möchte gerne meinen Vornamen und Nachnamen eingeben<br />
und der Cpmpiler soll mir den ganzen Namen ausspucken.<br />
Ich habe aber nicht gefunden, wie man so etwas bewekstelligt.</p>
<p>Hier ein Beispiel:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include&lt;conio.h&gt;
using namespace std;

int main()
{
    char name [15] = &quot;Max Mustermann&quot;;

    cout&lt;&lt;name&lt;&lt;endl;
    getch();
}
</code></pre>
<p>Jetzt möchte ich meinen eigenen Name eingeben und der Compiler soll ihn<br />
mir ausgeben. Es soll auch egal sein, wie lang der Name ist.<br />
Es sollen nur Leerzeichen und 2 Wörter vorhanden sein (Max Mustermann) !</p>
<p>Kann mir jemand helfen ?<br />
Vielen Dank im Voraus und LG Flo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1896593</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1896593</guid><dc:creator><![CDATA[Florian S.]]></dc:creator><pubDate>Thu, 13 May 2010 11:02:44 GMT</pubDate></item><item><title><![CDATA[Reply to char Arrays on Thu, 13 May 2010 11:06:39 GMT]]></title><description><![CDATA[<p>Schau im Buch deiner Wahl mal nach std::string. char-Arrays sind relativ low-level und die Benutzung meist auch nur im low-Level Bereich sinnvoll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1896594</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1896594</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Thu, 13 May 2010 11:06:39 GMT</pubDate></item><item><title><![CDATA[Reply to char Arrays on Thu, 13 May 2010 11:07:16 GMT]]></title><description><![CDATA[<p>Dafür benötigst Du folgende Dinge:</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;string&gt;</p>
<p>std::cin für das Einlesen<br />
std::cout für die Ausgabe</p>
<p>und std::string für die Speicherung (keine Char- Arrays mehr!).</p>
<p>Probiers mal und melde Dich wieder wenn Du damit nicht weiterkommst.<br />
Gruss Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1896596</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1896596</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Thu, 13 May 2010 11:07:16 GMT</pubDate></item><item><title><![CDATA[Reply to char Arrays on Thu, 13 May 2010 11:08:05 GMT]]></title><description><![CDATA[<p>Der Nachteil:</p>
<p>Es ist meist zu kompliziert erklärt und ich bin auch noch Anfänger...</p>
<p>Ich bräuchte als dringend eine Antwort in diesem Forum.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1896599</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1896599</guid><dc:creator><![CDATA[Florian S.]]></dc:creator><pubDate>Thu, 13 May 2010 11:08:05 GMT</pubDate></item><item><title><![CDATA[Reply to char Arrays on Thu, 13 May 2010 11:11:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/17323">@Florian</a> S.<br />
Welches Buch verwendest du denn?<br />
Ansonsten schlag die Befehle mal nach, zum Beispiel in einer C++ Referenz:<br />
<a href="http://www.cplusplus.com/reference/" rel="nofollow">http://www.cplusplus.com/reference/</a></p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/19131">@theta</a>,<br />
Er benötigt wahrscheinlich auch noch <code>std::getline</code> .</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1896601</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1896601</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Thu, 13 May 2010 11:11:14 GMT</pubDate></item><item><title><![CDATA[Reply to char Arrays on Thu, 13 May 2010 11:13:15 GMT]]></title><description><![CDATA[<blockquote>
<p>Ich bräuchte als dringend eine Antwort in diesem Forum.</p>
</blockquote>
<p>Aha. Ja, dann mach Dich mal dran etwas hier im Forum zu zeigen, wass Du mit den oben erwähnten Mitteln probiert hast.</p>
<p>edit:<br />
@Davere: ja, korrekt, danke. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1896602</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1896602</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Thu, 13 May 2010 11:13:15 GMT</pubDate></item><item><title><![CDATA[Reply to char Arrays on Thu, 13 May 2010 11:23:06 GMT]]></title><description><![CDATA[<p>@ theta</p>
<p>Jop, das hat geholfen !</p>
<p>Ich habe nur die char´s weggelassen und &quot;string&quot; für die Speicherung benutzt.<br />
Habe es machen können. Vielen Dank</p>
<p>LG Flo</p>
<p>PS: Bei dem Code, den ich gemacht habe , brauchst du kein std: :cout zu schreiben... Ich nutze &quot;using namespace std;&quot;</p>
<p>thx und byebye</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1896605</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1896605</guid><dc:creator><![CDATA[Florian S.]]></dc:creator><pubDate>Thu, 13 May 2010 11:23:06 GMT</pubDate></item></channel></rss>