<?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[Einen char in einen string &amp;quot;convertieren&amp;quot;]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte wissen, ob es eine schnellere und einfachere Methode gibt, einen <code>char</code> in einen C-String oder einen <code>std::string</code> zu &quot;verwandeln&quot;, als Stringstreams.</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/303373/einen-char-in-einen-string-quot-convertieren-quot</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 11:57:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/303373.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 12 May 2012 08:52:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 08:52:37 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte wissen, ob es eine schnellere und einfachere Methode gibt, einen <code>char</code> in einen C-String oder einen <code>std::string</code> zu &quot;verwandeln&quot;, als Stringstreams.</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2210754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210754</guid><dc:creator><![CDATA[charactus]]></dc:creator><pubDate>Sat, 12 May 2012 08:52:37 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 08:53:25 GMT]]></title><description><![CDATA[<p>charactus schrieb:</p>
<blockquote>
<p>Hallo,</p>
<p>ich möchte wissen, ob es eine schnellere und einfachere Methode gibt, einen <code>char</code> in einen C-String oder einen <code>std::string</code> zu &quot;verwandeln&quot;, als Stringstreams.</p>
<p>bb</p>
</blockquote>
<p>Na klar; quick and dirty Lösung:</p>
<pre><code class="language-cpp">char c('8');

std::string(&amp;c);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2210755</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210755</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 12 May 2012 08:53:25 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 08:59:02 GMT]]></title><description><![CDATA[<p>Quick and dirty mag das wohl sein, aber eine Lösung ist es nicht - &amp;c ist nicht null-terminiert.</p>
<pre><code class="language-cpp">std::string(1, '8');
</code></pre>
<p>müsste gehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2210756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210756</guid><dc:creator><![CDATA[seldon]]></dc:creator><pubDate>Sat, 12 May 2012 08:59:02 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 09:01:26 GMT]]></title><description><![CDATA[<p>Hacker schrieb:</p>
<blockquote>
<p>Na klar; quick and dirty Lösung:</p>
</blockquote>
<p>Nach über 1700 Beiträgen hast du Strings immernoch nicht verstanden? Reife Leistung. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2210757</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210757</guid><dc:creator><![CDATA[cooky451]]></dc:creator><pubDate>Sat, 12 May 2012 09:01:26 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 09:05:32 GMT]]></title><description><![CDATA[<p>cooky451 schrieb:</p>
<blockquote>
<p>Hacker schrieb:</p>
<blockquote>
<p>Na klar; quick and dirty Lösung:</p>
</blockquote>
<p>Nach über 1700 Beiträgen hast du Strings immernoch nicht verstanden? Reife Leistung. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
</blockquote>
<p>Ouh. Stimmt, denn es hat bei mir komischerweise funktioniert, dann hab ich nicht weiter nachgedacht...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2210758</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210758</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 12 May 2012 09:05:32 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 10:07:54 GMT]]></title><description><![CDATA[<p>Ich tippe mal darauf, dass dein Stack im Debugmodus ausgenullt ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2210769</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210769</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Sat, 12 May 2012 10:07:54 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 10:40:23 GMT]]></title><description><![CDATA[<p>C++11:</p>
<pre><code class="language-cpp">std::string str{c};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2210779</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210779</guid><dc:creator><![CDATA[pyhax]]></dc:creator><pubDate>Sat, 12 May 2012 10:40:23 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 10:57:38 GMT]]></title><description><![CDATA[<p>Ok danke, ich seh schon...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2210786</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210786</guid><dc:creator><![CDATA[charactus]]></dc:creator><pubDate>Sat, 12 May 2012 10:57:38 GMT</pubDate></item><item><title><![CDATA[Reply to Einen char in einen string &amp;quot;convertieren&amp;quot; on Sat, 12 May 2012 23:46:49 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">std::string str = std::string() = 'x';
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2210979</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2210979</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Sat, 12 May 2012 23:46:49 GMT</pubDate></item></channel></rss>