<?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[Hilfe IntToHex]]></title><description><![CDATA[<p>Guten Tag,</p>
<p>ich bin am Verzweifeln und Blicke so langsam nicht mehr durch,<br />
ich möchte eine</p>
<pre><code>unsigned long int IWert = 4294967295
</code></pre>
<p>in eine HEX wert umwandeln.</p>
<p>Mit der Funktion IntToHex habe ich es nicht geschaft.<br />
Dann habe ich folgendes Probiert</p>
<pre><code>char s[256];
 sprintf (s, &quot;%08lx&quot;, IWert);
</code></pre>
<p>hat leider auch nicht funktioniert.</p>
<p>Gibt es noch einen andere möglichkeit ???</p>
<p>mfg Kasten</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/91830/hilfe-inttohex</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Jul 2026 03:40:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/91830.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Nov 2004 15:40:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe IntToHex on Fri, 12 Nov 2004 15:40:03 GMT]]></title><description><![CDATA[<p>Guten Tag,</p>
<p>ich bin am Verzweifeln und Blicke so langsam nicht mehr durch,<br />
ich möchte eine</p>
<pre><code>unsigned long int IWert = 4294967295
</code></pre>
<p>in eine HEX wert umwandeln.</p>
<p>Mit der Funktion IntToHex habe ich es nicht geschaft.<br />
Dann habe ich folgendes Probiert</p>
<pre><code>char s[256];
 sprintf (s, &quot;%08lx&quot;, IWert);
</code></pre>
<p>hat leider auch nicht funktioniert.</p>
<p>Gibt es noch einen andere möglichkeit ???</p>
<p>mfg Kasten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650426</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650426</guid><dc:creator><![CDATA[KarstenF]]></dc:creator><pubDate>Fri, 12 Nov 2004 15:40:03 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Fri, 12 Nov 2004 15:57:10 GMT]]></title><description><![CDATA[<p>ich sehe keinen fehler. und bei meinem versuch hat es ohne problem geklappt. habe einfach deinen code kopiert und ausgeführt - zack hatte ich die hex-zahl. irgendwas anderes muss nicht stimmen. was gibt es denn konkret für ein problem/fehler?</p>
<p>oli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650445</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650445</guid><dc:creator><![CDATA[der oli]]></dc:creator><pubDate>Fri, 12 Nov 2004 15:57:10 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Fri, 12 Nov 2004 18:07:10 GMT]]></title><description><![CDATA[<p>Hallo Olli,</p>
<p>also ich bekomme immer nur ffffffff zurück.<br />
Und dieses wundert mich.<br />
Wenn ich eine kleinere Zahl als 4294967295 nehme dann klapt es.<br />
Aber bei den grossen Zahlen leider nicht !!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650537</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650537</guid><dc:creator><![CDATA[KarstenF]]></dc:creator><pubDate>Fri, 12 Nov 2004 18:07:10 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Fri, 12 Nov 2004 18:23:18 GMT]]></title><description><![CDATA[<p>Ein Integer hat 4 Byte und kann nicht größer sein als 4294967295.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650543</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650543</guid><dc:creator><![CDATA[T_B__]]></dc:creator><pubDate>Fri, 12 Nov 2004 18:23:18 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Sat, 13 Nov 2004 05:54:01 GMT]]></title><description><![CDATA[<p>Hat jemand eine IDEE oder einen Lösungsansatz wie ich diese<br />
zahl trozdem umwandeln kann ?</p>
<p>Gruss Karsten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650716</guid><dc:creator><![CDATA[KarstenF]]></dc:creator><pubDate>Sat, 13 Nov 2004 05:54:01 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Sat, 13 Nov 2004 09:27:22 GMT]]></title><description><![CDATA[<p>Warum muss du eine so große Zahl umwandeln?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650738</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650738</guid><dc:creator><![CDATA[T_B__]]></dc:creator><pubDate>Sat, 13 Nov 2004 09:27:22 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Sat, 13 Nov 2004 10:57:58 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>wandle diese Zahl doch per Hand um<br />
(ist eigentlich total einfach)</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650773</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650773</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Sat, 13 Nov 2004 10:57:58 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Sat, 13 Nov 2004 12:33:05 GMT]]></title><description><![CDATA[<p>hallo karsten!<br />
also, dass du ffff ffff zurück bekommst, ist doch sehr erfreulich weil richtig!<br />
wie du aber siehst, ist das die größte unsigned long-Zahl, die es gibt. weist du IWert eine größere Zahl zu, konvertiert IntToHex die Zahl zwar auch, ignoriert aber alle Stellen vor den letzten acht, da int-werte nun mal nicht größer sein können als ffffffff.<br />
wenn du größere zahlen brauchst, solltest du auf den __int64-typ umsteigen, der im BCB definiert ist und werte bis 2^63-1 oder als unsigned bis 2^64-1 aufnimmt. das sollte dann vielleicht genügen.<br />
Beispiel:</p>
<pre><code class="language-cpp">__int64 IWert = 4294967295i64;        // Suffix muss laut BCB-Hilfe wohl sein...
AnsiString hex = IntToHex(IWert,16);  // auf 16 Stellen ausgeben

// Es kommt heraus: hex = 00000000FFFFFFFF, also genau ffff ffff nur mit führenden Nullen.
</code></pre>
<p>gibst du mal eine größere zahl ein, z.b. IWert+1, bekommst du:</p>
<pre><code class="language-cpp">__int64 IWert2 = IWert+1;        
hex = IntToHex(IWert2,16);  

// Es kommt heraus: hex = 0000000100000000, so wie es sein muss.
</code></pre>
<p>ich hoffe, das hilft dir weiter. viel spaß noch,</p>
<p>oli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/650836</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/650836</guid><dc:creator><![CDATA[der oli]]></dc:creator><pubDate>Sat, 13 Nov 2004 12:33:05 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe IntToHex on Mon, 15 Nov 2004 20:00:34 GMT]]></title><description><![CDATA[<p>Danke für den Holzhammer hat geklappt,</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/652696</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/652696</guid><dc:creator><![CDATA[KarstenF]]></dc:creator><pubDate>Mon, 15 Nov 2004 20:00:34 GMT</pubDate></item></channel></rss>