<?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[2 Zahlen nach dem Komma ausgeben ??]]></title><description><![CDATA[<p>Hi, wie kann ich nur die letzten 2 Zahlen nach dem Komma ausgeben also</p>
<p>zb.</p>
<p>2.30</p>
<p>Ausgabe : 30;</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/127792/2-zahlen-nach-dem-komma-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Jul 2026 02:08:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/127792.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Nov 2005 14:25:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Sun, 27 Nov 2005 14:25:34 GMT]]></title><description><![CDATA[<p>Hi, wie kann ich nur die letzten 2 Zahlen nach dem Komma ausgeben also</p>
<p>zb.</p>
<p>2.30</p>
<p>Ausgabe : 30;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928360</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928360</guid><dc:creator><![CDATA[KrachbumEnte]]></dc:creator><pubDate>Sun, 27 Nov 2005 14:25:34 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Sun, 27 Nov 2005 15:24:44 GMT]]></title><description><![CDATA[<p>Wo sind die 2.30 drin?? In eine String, einem float (2.3)??</p>
<p>Für String:</p>
<pre><code class="language-cpp">String test=&quot;2.30&quot;;
test=test.SubString(test.Pos(&quot;.&quot;)+1,2);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/928411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928411</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 27 Nov 2005 15:24:44 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Sun, 27 Nov 2005 15:43:38 GMT]]></title><description><![CDATA[<p>In einem Float.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928427</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928427</guid><dc:creator><![CDATA[KrachbumEnte]]></dc:creator><pubDate>Sun, 27 Nov 2005 15:43:38 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Sun, 27 Nov 2005 15:58:54 GMT]]></title><description><![CDATA[<p>da steht dann aber nicht 2.30, sondern 2.3.</p>
<p>Konstrukte wie</p>
<pre><code class="language-cpp">float x=502.30;
x=x-(int)x;
</code></pre>
<p>führen zu Rundungsfehlern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928433</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 27 Nov 2005 15:58:54 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Sun, 27 Nov 2005 16:31:35 GMT]]></title><description><![CDATA[<p>Ja Loool dann Hab ich einfach 0.30 ? Aber ich möchte nur 30 haben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928460</guid><dc:creator><![CDATA[KrachbumEnte]]></dc:creator><pubDate>Sun, 27 Nov 2005 16:31:35 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Sun, 27 Nov 2005 16:37:10 GMT]]></title><description><![CDATA[<p>Wie wäre es, du schaust die nochmal die Dateitypen an. Ein float oder double kann nicht 2.30 enthalten. Entweder du findes einen mathematischen Weg die Vorkommastellen abzuschneiden und den Wert mit 100 zu multiplizieren (das führt meistens zu Rundungsfehlern) oder du wandelst den float in einen String um und führst eine Stringbearbeitung durch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928464</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928464</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 27 Nov 2005 16:37:10 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Mon, 28 Nov 2005 07:07:52 GMT]]></title><description><![CDATA[<p>*baut Christian's Beispiel weiter*</p>
<pre><code class="language-cpp">float v=2.30;
CString t;t.Format(&quot;%.2f&quot;,v);
t=t.SubString(t.Pos(&quot;.&quot;)+1,2);
</code></pre>
<p>Bringt das das richtige Ergebnis?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928745</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928745</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 28 Nov 2005 07:07:52 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Mon, 28 Nov 2005 07:11:15 GMT]]></title><description><![CDATA[<p>Nicht ganz, da CString meines Wissens zur MFC gehört und nicht zur VCL</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928748</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928748</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 28 Nov 2005 07:11:15 GMT</pubDate></item><item><title><![CDATA[Reply to 2 Zahlen nach dem Komma ausgeben ?? on Mon, 28 Nov 2005 08:47:09 GMT]]></title><description><![CDATA[<p>Christian211 schrieb:</p>
<blockquote>
<p>Nicht ganz, da CString meines Wissens zur MFC gehört und nicht zur VCL</p>
</blockquote>
<p>Ups, sorry - aber AnsiString dürfte auch eine Format()-Methode haben, wenn mich nicht alles täucht.<br />
(falls alle Stricke reißen, bleibt immer noch der Weg über sprintf() oder stringstreams)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928798</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928798</guid><dc:creator><![CDATA[CStoll (off)]]></dc:creator><pubDate>Mon, 28 Nov 2005 08:47:09 GMT</pubDate></item></channel></rss>