<?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[Funktion]]></title><description><![CDATA[<p>Hallo leute,</p>
<p>ich habe ein problem. wollte mir eine funktion erstellen, die mir einfach einen doublewert in einen string umwandeln.</p>
<p>dafür habe ich die funktion:</p>
<pre><code>std::string Double2Str(double dValue);
</code></pre>
<p>in der header-datei deklariert.</p>
<p>nun habe ich miene funktion in der .cpp datei erstellt. und zwar so:</p>
<pre><code>//Convert a double value to a string
std::string Double2Str(double dValue)
{
stringstream NewStreamApp; //std::ostringstream NewStreamApp;
NewStreamApp &lt;&lt; dValue;
return NewStreamApp.str();
}
</code></pre>
<p>leider bekomme ich die fehlermeldung, dass &quot;string&quot; kein element von std ist. benutze auch &quot;using namespace std;&quot;</p>
<p>wo könnte das problem liegen oder wie köntte ic hs lösen??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/181514/funktion</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 07:53:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/181514.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 May 2007 15:27:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Funktion on Mon, 14 May 2007 15:27:08 GMT]]></title><description><![CDATA[<p>Hallo leute,</p>
<p>ich habe ein problem. wollte mir eine funktion erstellen, die mir einfach einen doublewert in einen string umwandeln.</p>
<p>dafür habe ich die funktion:</p>
<pre><code>std::string Double2Str(double dValue);
</code></pre>
<p>in der header-datei deklariert.</p>
<p>nun habe ich miene funktion in der .cpp datei erstellt. und zwar so:</p>
<pre><code>//Convert a double value to a string
std::string Double2Str(double dValue)
{
stringstream NewStreamApp; //std::ostringstream NewStreamApp;
NewStreamApp &lt;&lt; dValue;
return NewStreamApp.str();
}
</code></pre>
<p>leider bekomme ich die fehlermeldung, dass &quot;string&quot; kein element von std ist. benutze auch &quot;using namespace std;&quot;</p>
<p>wo könnte das problem liegen oder wie köntte ic hs lösen??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1284754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284754</guid><dc:creator><![CDATA[TesterProg]]></dc:creator><pubDate>Mon, 14 May 2007 15:27:08 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion on Mon, 14 May 2007 15:37:19 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Hast du</p>
<pre><code class="language-cpp">#include &lt;string&gt;
</code></pre>
<p>mit drin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1284762</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284762</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 14 May 2007 15:37:19 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion on Mon, 14 May 2007 15:52:52 GMT]]></title><description><![CDATA[<p>hmm x to std::string</p>
<pre><code class="language-cpp">#include &lt;string&gt;
#include &lt;sstream&gt;

template&lt;typename T&gt;
std::string tostr(const T&amp; value)
{
    std::ostringstream ss;
    ss &lt;&lt; value;
    return (!ss ? &quot;&quot; : ss.str());
}
</code></pre>
<p><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/1284774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284774</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 14 May 2007 15:52:52 GMT</pubDate></item></channel></rss>