<?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 hilfe]]></title><description><![CDATA[<pre><code>char a = 'A';
	std::string b(a);
</code></pre>
<p>Der Compiler sagt, dass kein passender Standardkonstruktor vorhanden ist. Wie kann ich ein normales char in einen std::string konvertieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/324809/string-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 22:01:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/324809.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Apr 2014 16:21:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to string hilfe on Wed, 02 Apr 2014 16:21:34 GMT]]></title><description><![CDATA[<pre><code>char a = 'A';
	std::string b(a);
</code></pre>
<p>Der Compiler sagt, dass kein passender Standardkonstruktor vorhanden ist. Wie kann ich ein normales char in einen std::string konvertieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2392404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2392404</guid><dc:creator><![CDATA[sdgshshd]]></dc:creator><pubDate>Wed, 02 Apr 2014 16:21:34 GMT</pubDate></item><item><title><![CDATA[Reply to string hilfe on Wed, 02 Apr 2014 16:23:38 GMT]]></title><description><![CDATA[<p>So:</p>
<pre><code>std::string b(1, a);
</code></pre>
<p>Oder so:</p>
<pre><code>std::string b{a};
</code></pre>
<p>Da letzteres implizit funktioniert kannst du auch</p>
<pre><code>void f(std::string);
f({A});
</code></pre>
<p>schreiben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2392405</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2392405</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Wed, 02 Apr 2014 16:23:38 GMT</pubDate></item></channel></rss>