<?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[Ausgabestream]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich versuche gerade, einen Hexadezimalwert in einen ostringstream zu schreiben:</p>
<p>ostringstream os;<br />
os &lt;&lt; hex &lt;&lt; showbase &lt;&lt; wert;</p>
<p>bringt mir als Ergebnis 0, wenn der Wert == 0 ist.<br />
Ich hätte aber gerne als Ergebnis 0x00;<br />
Wenn der Wert zB 14 ist, bekomme ich als Ergebnis 0xe, ich hätte aber gerne:<br />
0x0e</p>
<p>Es ist mir bisher nicht gelungen, mit irgendwelchen Manipulatoren das gewünschte Ergebnis zu erzielen, geht das am Ende überhaupt irgendwie, oder muss ich hier die Formatierung per Hand machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/229169/ausgabestream</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 03:52:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/229169.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Dec 2008 13:51:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ausgabestream on Mon, 08 Dec 2008 13:51:28 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich versuche gerade, einen Hexadezimalwert in einen ostringstream zu schreiben:</p>
<p>ostringstream os;<br />
os &lt;&lt; hex &lt;&lt; showbase &lt;&lt; wert;</p>
<p>bringt mir als Ergebnis 0, wenn der Wert == 0 ist.<br />
Ich hätte aber gerne als Ergebnis 0x00;<br />
Wenn der Wert zB 14 ist, bekomme ich als Ergebnis 0xe, ich hätte aber gerne:<br />
0x0e</p>
<p>Es ist mir bisher nicht gelungen, mit irgendwelchen Manipulatoren das gewünschte Ergebnis zu erzielen, geht das am Ende überhaupt irgendwie, oder muss ich hier die Formatierung per Hand machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1627006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1627006</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Mon, 08 Dec 2008 13:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to Ausgabestream on Mon, 08 Dec 2008 14:11:27 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">std::cout &lt;&lt; &quot;0x&quot; &lt;&lt; std::hex &lt;&lt; std::setw(2) &lt;&lt; std::setfill('0') &lt;&lt; zahl &lt;&lt; std::endl;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1627013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1627013</guid><dc:creator><![CDATA[ratefux]]></dc:creator><pubDate>Mon, 08 Dec 2008 14:11:27 GMT</pubDate></item><item><title><![CDATA[Reply to Ausgabestream on Mon, 08 Dec 2008 14:37:16 GMT]]></title><description><![CDATA[<p>Klappt ganz vorherragend!</p>
<p>Danke schön!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1627026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1627026</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Mon, 08 Dec 2008 14:37:16 GMT</pubDate></item></channel></rss>