<?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[Integer Variable in String Variable schreiben?!?]]></title><description><![CDATA[<p>Hallo!<br />
Wie kann ich den Wert der in einer Integer Variable steht in eine string Variable schreiben?!?</p>
<p>also sozusagen:</p>
<pre><code>int zahl = 10;
string zeichenkette;

zeichenkette = zahl // ?!?!

cout&lt;&lt;zeichenkette // jetz soll eine 10 erscheinen!
</code></pre>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173320/integer-variable-in-string-variable-schreiben</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 06:44:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173320.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Feb 2007 08:46:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Integer Variable in String Variable schreiben?!? on Wed, 14 Feb 2007 08:46:07 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Wie kann ich den Wert der in einer Integer Variable steht in eine string Variable schreiben?!?</p>
<p>also sozusagen:</p>
<pre><code>int zahl = 10;
string zeichenkette;

zeichenkette = zahl // ?!?!

cout&lt;&lt;zeichenkette // jetz soll eine 10 erscheinen!
</code></pre>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1228536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228536</guid><dc:creator><![CDATA[c0CoKabAnA]]></dc:creator><pubDate>Wed, 14 Feb 2007 08:46:07 GMT</pubDate></item><item><title><![CDATA[Reply to Integer Variable in String Variable schreiben?!? on Wed, 14 Feb 2007 08:53:50 GMT]]></title><description><![CDATA[<p>Erstens: Du kannst die Zahl auch direkt per <code>cout&lt;&lt;zahl;</code> ausgeben, ohne sie vorher in einen String umwandeln zu müssen.</p>
<p>Zweitens: In der FAQ findest du einen Beitrag &quot;Einmal Zahl nach String und zurück&quot; - der ist imo sehr lesenswert und informativ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1228543</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228543</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 14 Feb 2007 08:53:50 GMT</pubDate></item><item><title><![CDATA[Reply to Integer Variable in String Variable schreiben?!? on Wed, 14 Feb 2007 09:07:52 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Du kannst auch boost::lexical_cast nutzen.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1228547</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228547</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 14 Feb 2007 09:07:52 GMT</pubDate></item><item><title><![CDATA[Reply to Integer Variable in String Variable schreiben?!? on Wed, 14 Feb 2007 13:56:26 GMT]]></title><description><![CDATA[<p>oder selber schreiben ^^</p>
<p>vllt wäre sowas wie folgt ganz praktisch ...</p>
<pre><code class="language-cpp">template&lt; typename dest, typename type&gt;
dest lexical_cast(const type&amp; Type) 
{
        std::stringstream ss;
        ss &lt;&lt; type;
        dest to;
        ss &gt;&gt; to;
        return to;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1228776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228776</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Wed, 14 Feb 2007 13:56:26 GMT</pubDate></item><item><title><![CDATA[Reply to Integer Variable in String Variable schreiben?!? on Wed, 14 Feb 2007 14:07:46 GMT]]></title><description><![CDATA[<p>Wenn du das schon selber schreiben willst, wäre eine Fehlerbehandlung nicht schlecht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1228788</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228788</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 14 Feb 2007 14:07:46 GMT</pubDate></item></channel></rss>