<?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-Pointer]]></title><description><![CDATA[<p>Ich habe eine Frage:<br />
und zwar wie kann ich den Inhalt eines char-Zeigers in ein char Array schreiben?<br />
thx schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/136838/char-pointer</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 16:34:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/136838.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Feb 2006 15:55:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 15:55:34 GMT]]></title><description><![CDATA[<p>Ich habe eine Frage:<br />
und zwar wie kann ich den Inhalt eines char-Zeigers in ein char Array schreiben?<br />
thx schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993189</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993189</guid><dc:creator><![CDATA[Dante McRayne]]></dc:creator><pubDate>Mon, 13 Feb 2006 15:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 16:03:35 GMT]]></title><description><![CDATA[<p>Dante McRayne schrieb:</p>
<blockquote>
<p>Ich habe eine Frage:<br />
und zwar wie kann ich den Inhalt eines char-Zeigers in ein char Array schreiben?<br />
thx schonmal!</p>
</blockquote>
<p>Z.B. mit der Funktion <a href="http://www.cppreference.com/stdstring/strcpy.html" rel="nofollow">strcpy()</a>.</p>
<p>Bsp:</p>
<pre><code class="language-cpp">#include &lt;cstring&gt; // für strcpy().
using namespace std;

int main()
{
    const char* str_lit = &quot;Hallo C++!&quot;;
    char str[11];

    // jetzt wird der Inhalt von str_lit in str kopiert:
    strcpy(str, str_lit);
}
</code></pre>
<p>Gruß Caipi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993192</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993192</guid><dc:creator><![CDATA[Caipi]]></dc:creator><pubDate>Mon, 13 Feb 2006 16:03:35 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 16:01:39 GMT]]></title><description><![CDATA[<p>strcpy() (oder noch besser: strncpy(), damit kannst du die maximale Größe angeben)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993193</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993193</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 13 Feb 2006 16:01:39 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 16:35:41 GMT]]></title><description><![CDATA[<p>Am besten du nimmst memcpy. strcpy ist unsicher und strncpy ist sehr sehr merkwürdig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993236</guid><dc:creator><![CDATA[Korrekt]]></dc:creator><pubDate>Mon, 13 Feb 2006 16:35:41 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 16:41:08 GMT]]></title><description><![CDATA[<p>Warum sollte strncpy merkwürdig sein <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>Beim memcpy nicht vergessen ein Byte mehr zu kopieren, sonst fehlt das Nullbyte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993245</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993245</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Mon, 13 Feb 2006 16:41:08 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 16:59:42 GMT]]></title><description><![CDATA[<p>msdn schrieb:</p>
<blockquote>
<p>The strncpy function copies the initial count characters of strSource to strDest and returns strDest. If count is less than or equal to the length of strSource, a null character is not appended automatically to the copied string.</p>
</blockquote>
<p>Deswegen kann man es auch gleich mit memcpy machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993267</guid><dc:creator><![CDATA[Korrekt]]></dc:creator><pubDate>Mon, 13 Feb 2006 16:59:42 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 19:34:25 GMT]]></title><description><![CDATA[<p>thx for help nun ne andere Frage wie kann ich Zeichen aus einem char-Array addiert in einen string array schreiben?<br />
Beispiel: char-Array: ['a','b','c'] in String-Array: [&quot;abc&quot;] ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993430</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993430</guid><dc:creator><![CDATA[Dante McRayne]]></dc:creator><pubDate>Mon, 13 Feb 2006 19:34:25 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 20:06:57 GMT]]></title><description><![CDATA[<p>Was genau meinst du mit string-Array?<br />
Ich denke mal nicht</p>
<pre><code class="language-cpp">std::string foo[42];
</code></pre>
<p>oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993467</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993467</guid><dc:creator><![CDATA[michba]]></dc:creator><pubDate>Mon, 13 Feb 2006 20:06:57 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Mon, 13 Feb 2006 20:44:43 GMT]]></title><description><![CDATA[<p>doch ich meinte vector &lt;string&gt; foo.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993510</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993510</guid><dc:creator><![CDATA[Dante McRayne]]></dc:creator><pubDate>Mon, 13 Feb 2006 20:44:43 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Tue, 14 Feb 2006 07:00:22 GMT]]></title><description><![CDATA[<p>mit</p>
<pre><code class="language-cpp">foo.push_back(string(&quot;Hallo&quot;));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/993644</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993644</guid><dc:creator><![CDATA[Konfusius]]></dc:creator><pubDate>Tue, 14 Feb 2006 07:00:22 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Tue, 14 Feb 2006 09:56:15 GMT]]></title><description><![CDATA[<p>Nein das geht glaube nicht...is mach nen neuen Thread auf und erkläre es nochmal bzw. besser.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993738</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993738</guid><dc:creator><![CDATA[Dante McRayne]]></dc:creator><pubDate>Tue, 14 Feb 2006 09:56:15 GMT</pubDate></item><item><title><![CDATA[Reply to Char-Pointer on Tue, 14 Feb 2006 10:03:24 GMT]]></title><description><![CDATA[<p>Hier geht es weiter:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-136923.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-136923.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/993747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993747</guid><dc:creator><![CDATA[evilissimo]]></dc:creator><pubDate>Tue, 14 Feb 2006 10:03:24 GMT</pubDate></item></channel></rss>