<?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[hilfe zu c_str()]]></title><description><![CDATA[<p>Hallo, wie kann ich soetwas denn in einem schritt machen?:</p>
<pre><code class="language-cpp">std::string readstring;
std::string noch_ein_string;
char help_char;
noch_ein_string = readstring.substr(0, 1);
help_char = noch_ein_string.c_str();
</code></pre>
<p>ich hab das mal so versucht, ging aber schief:</p>
<pre><code class="language-cpp">std::string readstring;
char help_char;
help_char = readstring.substr(0, 1).c_str();
</code></pre>
<p>ist mit sicherheit sehr einfach, ich komme aber gerade nichtdrauf...<br />
Danke schonmal für eure hilfe!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/267951/hilfe-zu-c_str</link><generator>RSS for Node</generator><lastBuildDate>Wed, 02 Sep 2026 06:04:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/267951.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 Jun 2010 18:35:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to hilfe zu c_str() on Tue, 01 Jun 2010 18:40:49 GMT]]></title><description><![CDATA[<p>Hallo, wie kann ich soetwas denn in einem schritt machen?:</p>
<pre><code class="language-cpp">std::string readstring;
std::string noch_ein_string;
char help_char;
noch_ein_string = readstring.substr(0, 1);
help_char = noch_ein_string.c_str();
</code></pre>
<p>ich hab das mal so versucht, ging aber schief:</p>
<pre><code class="language-cpp">std::string readstring;
char help_char;
help_char = readstring.substr(0, 1).c_str();
</code></pre>
<p>ist mit sicherheit sehr einfach, ich komme aber gerade nichtdrauf...<br />
Danke schonmal für eure hilfe!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1905619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1905619</guid><dc:creator><![CDATA[sudo rm -rf]]></dc:creator><pubDate>Tue, 01 Jun 2010 18:40:49 GMT</pubDate></item><item><title><![CDATA[Reply to hilfe zu c_str() on Tue, 01 Jun 2010 18:41:36 GMT]]></title><description><![CDATA[<p>help_char ist ein char, std::string::c_str() gibt einen const char*. Passt das zusammen? Nein.<br />
Du suchst wahrscheinlich</p>
<pre><code class="language-cpp">char help_char = readstring[0];
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1905623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1905623</guid><dc:creator><![CDATA[l&#x27;abra d&#x27;or]]></dc:creator><pubDate>Tue, 01 Jun 2010 18:41:36 GMT</pubDate></item><item><title><![CDATA[Reply to hilfe zu c_str() on Tue, 01 Jun 2010 19:03:27 GMT]]></title><description><![CDATA[<p>danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1905629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1905629</guid><dc:creator><![CDATA[sudo rm -rf]]></dc:creator><pubDate>Tue, 01 Jun 2010 19:03:27 GMT</pubDate></item><item><title><![CDATA[Reply to hilfe zu c_str() on Tue, 01 Jun 2010 19:05:35 GMT]]></title><description><![CDATA[<pre><code>help_char = noch_ein_string.c_str()[0];
</code></pre>
<p>tschüß<br />
Troll.Soft</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1905630</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1905630</guid><dc:creator><![CDATA[Troll.Soft]]></dc:creator><pubDate>Tue, 01 Jun 2010 19:05:35 GMT</pubDate></item></channel></rss>