<?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---&amp;gt;float]]></title><description><![CDATA[<p>also ich will einen int wert(x) in einen float wert verwandeln, und benutze dazu folgendes statement:</p>
<p>x=static_cast&lt;float&gt;(x);</p>
<p>ich bekomme dabei aber immer die warnung:</p>
<p>Warnung: converting to `int' from `float'</p>
<p>weiß jemand was ich falsch mache?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/118590/int-gt-float</link><generator>RSS for Node</generator><lastBuildDate>Fri, 21 Aug 2026 12:15:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/118590.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Aug 2005 09:52:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to int---&amp;gt;float on Mon, 22 Aug 2005 09:52:35 GMT]]></title><description><![CDATA[<p>also ich will einen int wert(x) in einen float wert verwandeln, und benutze dazu folgendes statement:</p>
<p>x=static_cast&lt;float&gt;(x);</p>
<p>ich bekomme dabei aber immer die warnung:</p>
<p>Warnung: converting to `int' from `float'</p>
<p>weiß jemand was ich falsch mache?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/855934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/855934</guid><dc:creator><![CDATA[rutzen]]></dc:creator><pubDate>Mon, 22 Aug 2005 09:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to int---&amp;gt;float on Mon, 22 Aug 2005 10:00:10 GMT]]></title><description><![CDATA[<p>Na so wie das darsteht kann das ja nichts werden.</p>
<pre><code class="language-cpp">int x = 4;
x = static_cast&lt;float&gt;(x);
</code></pre>
<p>Wenn dann mach es mal so:</p>
<pre><code class="language-cpp">int x = 4;
float fx = static_cast&lt;float&gt;(x);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/855940</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/855940</guid><dc:creator><![CDATA[hehejo]]></dc:creator><pubDate>Mon, 22 Aug 2005 10:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to int---&amp;gt;float on Mon, 22 Aug 2005 10:02:42 GMT]]></title><description><![CDATA[<blockquote>
<p>x=static_cast&lt;float&gt;(x);</p>
</blockquote>
<p>Hallo,<br />
Ich nehmne an, dein x ist ein int. Und das bleibt es auch. Du wandelst es zwar in einen float um, weist es aber wieder deinem alten x(int) zu!</p>
<p>also:</p>
<p>int x=10;<br />
float y=(float)x;</p>
<p>Das geht dann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/855943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/855943</guid><dc:creator><![CDATA[denali]]></dc:creator><pubDate>Mon, 22 Aug 2005 10:02:42 GMT</pubDate></item><item><title><![CDATA[Reply to int---&amp;gt;float on Mon, 22 Aug 2005 11:43:32 GMT]]></title><description><![CDATA[<p>super, funktioniert!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/856032</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/856032</guid><dc:creator><![CDATA[rutzen]]></dc:creator><pubDate>Mon, 22 Aug 2005 11:43:32 GMT</pubDate></item><item><title><![CDATA[Reply to int---&amp;gt;float on Mon, 22 Aug 2005 11:49:17 GMT]]></title><description><![CDATA[<p>nein, tut es doch nicht</p>
<p>bleibt bei beiden methoden das gleiche</p>
]]></description><link>https://www.c-plusplus.net/forum/post/856041</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/856041</guid><dc:creator><![CDATA[rutzen]]></dc:creator><pubDate>Mon, 22 Aug 2005 11:49:17 GMT</pubDate></item><item><title><![CDATA[Reply to int---&amp;gt;float on Mon, 22 Aug 2005 11:53:50 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int i = 5;
float f = static_cast&lt;float&gt;(i);

float f = 5;
int i = static_cast&lt;int&gt;(f);
</code></pre>
<p>Sollte einer der beiden Varianten bei dir eine Warnung schmeißen, dreh die Warnung ab. Welchen Compiler hast du denn?</p>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/856048</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/856048</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Mon, 22 Aug 2005 11:53:50 GMT</pubDate></item><item><title><![CDATA[Reply to int---&amp;gt;float on Mon, 22 Aug 2005 11:53:57 GMT]]></title><description><![CDATA[<p>na dann liegt es vielleicht an der Ausgabe, wie gibst du dein flaot aus????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/856050</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/856050</guid><dc:creator><![CDATA[Polofreak]]></dc:creator><pubDate>Mon, 22 Aug 2005 11:53:57 GMT</pubDate></item></channel></rss>