<?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[int in std::string konvertieren]]></title><description><![CDATA[<p>abend allerseits!<br />
wie bekomme ich eine int variable am besten in einen std::string konvertiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/167934/int-in-std-string-konvertieren</link><generator>RSS for Node</generator><lastBuildDate>Wed, 16 Sep 2026 05:54:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/167934.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Dec 2006 19:21:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to int in std::string konvertieren on Sat, 16 Dec 2006 19:21:13 GMT]]></title><description><![CDATA[<p>abend allerseits!<br />
wie bekomme ich eine int variable am besten in einen std::string konvertiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1193084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1193084</guid><dc:creator><![CDATA[inttostr]]></dc:creator><pubDate>Sat, 16 Dec 2006 19:21:13 GMT</pubDate></item><item><title><![CDATA[Reply to int in std::string konvertieren on Sat, 16 Dec 2006 19:34:19 GMT]]></title><description><![CDATA[<p>inttostr schrieb:</p>
<blockquote>
<p>abend allerseits!<br />
wie bekomme ich eine int variable am besten in einen std::string konvertiert?</p>
</blockquote>
<p>Stichwort 'lexical_cast':</p>
<pre><code class="language-cpp">template&lt;typename Target, typename Source&gt;
    Target lexical_cast(Source arg)
    {
      std::stringstream interpreter;
      Target result;

      if(!(interpreter &lt;&lt; arg) ||
         !(interpreter &gt;&gt; result) ||
         !(interpreter &gt;&gt; std::ws).eof())
        throw bad_lexical_cast();

      return result;
    }
</code></pre>
<p><a href="http://www.gotw.ca/publications/mill19.htm" rel="nofollow">http://www.gotw.ca/publications/mill19.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1193090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1193090</guid><dc:creator><![CDATA[Konrad Rudolph]]></dc:creator><pubDate>Sat, 16 Dec 2006 19:34:19 GMT</pubDate></item><item><title><![CDATA[Reply to int in std::string konvertieren on Sat, 16 Dec 2006 20:48:32 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>siehe auch das Thema <em>Einmal String und zurück</em> in der CPP-FAQ.</p>
<p>bis bald<br />
akair</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1193106</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1193106</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 16 Dec 2006 20:48:32 GMT</pubDate></item></channel></rss>