<?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[cout und hex]]></title><description><![CDATA[<p>mein frage ist eigentlich ganz simpel... wie kann ich einen hexdezimalen wert strecken, also mit nullen auffüllen lassen, so das er eine bestimmte länge hat.</p>
<p>beispiel<br />
der dezimale wert 3 soll als 0x0003 dargestellt werden. verwende ich &quot;hex&quot; in der cout anweisung, kommt aber nur 0x3 raus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/148559/cout-und-hex</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Sep 2026 21:48:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/148559.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 May 2006 10:09:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to cout und hex on Sun, 28 May 2006 10:09:31 GMT]]></title><description><![CDATA[<p>mein frage ist eigentlich ganz simpel... wie kann ich einen hexdezimalen wert strecken, also mit nullen auffüllen lassen, so das er eine bestimmte länge hat.</p>
<p>beispiel<br />
der dezimale wert 3 soll als 0x0003 dargestellt werden. verwende ich &quot;hex&quot; in der cout anweisung, kommt aber nur 0x3 raus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066515</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066515</guid><dc:creator><![CDATA[BackusNaur]]></dc:creator><pubDate>Sun, 28 May 2006 10:09:31 GMT</pubDate></item><item><title><![CDATA[Reply to cout und hex on Sun, 28 May 2006 11:06:35 GMT]]></title><description><![CDATA[<p>Was ja soweit auch logisch ist. Du schreibst ja auch nicht 00000001,000000 sondern einfach nur 1. Naja für dein Problem weiß ich keine Lösung wie man das machne könnte, denn dazu müsste man imho das hexflag umbauen.</p>
<p>Du könntest aber auch selbst ein Programm schreiben das die Zahlen in hex umwandelt und dann dementsprechend, wie du nullen haben willst, ausgibt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066546</guid><dc:creator><![CDATA[Jens_König]]></dc:creator><pubDate>Sun, 28 May 2006 11:06:35 GMT</pubDate></item><item><title><![CDATA[Reply to cout und hex on Sun, 28 May 2006 11:07:11 GMT]]></title><description><![CDATA[<p>Hast du dir schonmal die Manipulatoren setfill() und setw() angeschaut?</p>
<p>Beispiel:</p>
<pre><code class="language-cpp">cout &lt;&lt; setfill('0') &lt;&lt; setw(3) &lt;&lt; hex &lt;&lt; 12 &lt;&lt; endl; // Ausgabe: 00c
</code></pre>
<p>Zur Not musst du dir halt einen eigenen Manipulator schreiben.</p>
<p>Gruß, Caipi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066548</guid><dc:creator><![CDATA[Caipi]]></dc:creator><pubDate>Sun, 28 May 2006 11:07:11 GMT</pubDate></item></channel></rss>