<?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[string char]]></title><description><![CDATA[<p>Hi Leutz,<br />
schon ma sorry für so eine billige Frage.</p>
<p>Ich kriege es nicht hin einen normalen std::String in ein<br />
Char-Array rein zu kriegen und aus dem Array wieder einen String zu machen.<br />
(will das Char-Array bearbeiten ist also nicht ganz sinnfrei xD)</p>
<p>schon mal thx Gruss Irods</p>
<p>PS: Ein kleiner Code-Abschnitt in dem das passiert wäre mega hilfreich xP</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/248105/string-char</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 06:18:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/248105.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Aug 2009 18:28:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 18:28:17 GMT]]></title><description><![CDATA[<p>Hi Leutz,<br />
schon ma sorry für so eine billige Frage.</p>
<p>Ich kriege es nicht hin einen normalen std::String in ein<br />
Char-Array rein zu kriegen und aus dem Array wieder einen String zu machen.<br />
(will das Char-Array bearbeiten ist also nicht ganz sinnfrei xD)</p>
<p>schon mal thx Gruss Irods</p>
<p>PS: Ein kleiner Code-Abschnitt in dem das passiert wäre mega hilfreich xP</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763667</guid><dc:creator><![CDATA[Irods]]></dc:creator><pubDate>Wed, 19 Aug 2009 18:28:17 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 18:33:36 GMT]]></title><description><![CDATA[<p>Du musst das nicht immer rumkopieren wenn du den String manipulieren willst. Du kannst den String auch direkt verändern, z.B. per []-Operator.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763670</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Wed, 19 Aug 2009 18:33:36 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 18:33:49 GMT]]></title><description><![CDATA[<p>Konvertieren ist das Stichwort.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763671</guid><dc:creator><![CDATA[Hallo!]]></dc:creator><pubDate>Wed, 19 Aug 2009 18:33:49 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 18:48:53 GMT]]></title><description><![CDATA[<p>mm ich will wenn es Chars sind die mit der XOR-Funktion mit einem Char<br />
verknüpfen das geht beim String selber leider nicht.<br />
oder doch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763676</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763676</guid><dc:creator><![CDATA[Irods]]></dc:creator><pubDate>Wed, 19 Aug 2009 18:48:53 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 18:49:25 GMT]]></title><description><![CDATA[<p>Ja, das geht.</p>
<pre><code class="language-cpp">std::string Str(&quot;Hallo&quot;);
Str[2] ^= 'u';
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1763677</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763677</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 19 Aug 2009 18:49:25 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 19:14:14 GMT]]></title><description><![CDATA[<p>jo thx danke leute</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763689</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763689</guid><dc:creator><![CDATA[Irods]]></dc:creator><pubDate>Wed, 19 Aug 2009 19:14:14 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 19:20:39 GMT]]></title><description><![CDATA[<p>Wenn Du es wirklich kopieren willst, dann mache doch einfach eine for-Schleife und weise jedes einzelnes Stringelement deinem char* zur?!</p>
<p>Sollte doch eigentlich klappen....</p>
<p>lg, freakC++</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763692</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763692</guid><dc:creator><![CDATA[freakC++]]></dc:creator><pubDate>Wed, 19 Aug 2009 19:20:39 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 19:50:08 GMT]]></title><description><![CDATA[<p>freakC++ schrieb:</p>
<blockquote>
<p>Wenn Du es wirklich kopieren willst, dann mache doch einfach eine for-Schleife und weise jedes einzelnes Stringelement deinem char* zur?!</p>
<p>Sollte doch eigentlich klappen....</p>
</blockquote>
<p>Ja, bestimmt. Aber vielleicht wäre auch std::string::c_str und z.B. strcpy oder strncpy sinnvoller und kürzer. Aber na ja, die richtige Lösung (nicht kopieren) wurde ja schon genannt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763709</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 19 Aug 2009 19:50:08 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 20:13:00 GMT]]></title><description><![CDATA[<p>_matze schrieb:</p>
<blockquote>
<p>freakC++ schrieb:</p>
<blockquote>
<p>Wenn Du es wirklich kopieren willst, dann mache doch einfach eine for-Schleife und weise jedes einzelnes Stringelement deinem char* zur?!</p>
<p>Sollte doch eigentlich klappen....</p>
</blockquote>
<p>Ja, bestimmt. Aber vielleicht wäre auch std::string::c_str und z.B. strcpy oder strncpy sinnvoller und kürzer. Aber na ja, die richtige Lösung (nicht kopieren) wurde ja schon genannt...</p>
</blockquote>
<p>Oder:</p>
<pre><code class="language-cpp">std::copy( str.begin(), str.end(), output )
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1763716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763716</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Wed, 19 Aug 2009 20:13:00 GMT</pubDate></item><item><title><![CDATA[Reply to string char on Wed, 19 Aug 2009 20:30:07 GMT]]></title><description><![CDATA[<p>David_pb schrieb:</p>
<blockquote>
<p>Oder:</p>
<pre><code class="language-cpp">std::copy( str.begin(), str.end(), output )
</code></pre>
</blockquote>
<p>Dann fehlt aber die Nullterminierung, falls output ein cstring werden soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763730</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763730</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 19 Aug 2009 20:30:07 GMT</pubDate></item></channel></rss>