<?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[Hexeditor]]></title><description><![CDATA[<p>Ich möchte einen kleinen Hexeditor in C++ schreiben, leider kommen bei meinen Programm andere Daten heraus als bei Bless. Liegt es an der Art wie ich die Daten lese?</p>
<pre><code>int value = 0;
stream.read(reinterpret_cast&lt;char*&gt;(&amp;value), sizeof(int));
std::cout &lt;&lt; std::hex &lt;&lt; std::bitset&lt;8&gt;(value).to_ullong();
</code></pre>
<p>Hier ist das was mein Programm mir ausspuckt:</p>
<pre><code>7f	2	0	0	2	1	c0	0	40	0	38	0	0	40	8	1e
</code></pre>
<p>Das hier gibt Bless aus:</p>
<pre><code>7F 45 4C 46 02 01 01 00 00 00 00 00 00 00 00 00 02 00 3E 00 01
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/333340/hexeditor</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 05:19:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/333340.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 27 Jun 2015 11:39:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hexeditor on Sat, 27 Jun 2015 11:39:26 GMT]]></title><description><![CDATA[<p>Ich möchte einen kleinen Hexeditor in C++ schreiben, leider kommen bei meinen Programm andere Daten heraus als bei Bless. Liegt es an der Art wie ich die Daten lese?</p>
<pre><code>int value = 0;
stream.read(reinterpret_cast&lt;char*&gt;(&amp;value), sizeof(int));
std::cout &lt;&lt; std::hex &lt;&lt; std::bitset&lt;8&gt;(value).to_ullong();
</code></pre>
<p>Hier ist das was mein Programm mir ausspuckt:</p>
<pre><code>7f	2	0	0	2	1	c0	0	40	0	38	0	0	40	8	1e
</code></pre>
<p>Das hier gibt Bless aus:</p>
<pre><code>7F 45 4C 46 02 01 01 00 00 00 00 00 00 00 00 00 02 00 3E 00 01
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2457942</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2457942</guid><dc:creator><![CDATA[hexhexhex]]></dc:creator><pubDate>Sat, 27 Jun 2015 11:39:26 GMT</pubDate></item><item><title><![CDATA[Reply to Hexeditor on Sat, 27 Jun 2015 12:30:12 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int value;

while((value = stream.get()) != EOF)
    std::cout &lt;&lt; std::hex &lt;&lt; setw(2) &lt;&lt; setfill('0') &lt;&lt; value &lt;&lt; ' ';
</code></pre>
<p>s.a. <a href="http://www.cplusplus.com/reference/istream/istream/get/" rel="nofollow">istream.get</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2457943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2457943</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Sat, 27 Jun 2015 12:30:12 GMT</pubDate></item><item><title><![CDATA[Reply to Hexeditor on Sat, 27 Jun 2015 12:46:42 GMT]]></title><description><![CDATA[<p>Wieviel Bytes liest du beim read ein?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2457944</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2457944</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Sat, 27 Jun 2015 12:46:42 GMT</pubDate></item><item><title><![CDATA[Reply to Hexeditor on Sat, 27 Jun 2015 13:08:14 GMT]]></title><description><![CDATA[<p>Danke für die schnell Antwort.</p>
<p>DirkB schrieb:</p>
<blockquote>
<p>Wieviel Bytes liest du beim read ein?</p>
</blockquote>
<p>4 Bytes oder täusche ich mich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2457945</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2457945</guid><dc:creator><![CDATA[hexhexhex]]></dc:creator><pubDate>Sat, 27 Jun 2015 13:08:14 GMT</pubDate></item><item><title><![CDATA[Reply to Hexeditor on Sat, 27 Jun 2015 15:50:48 GMT]]></title><description><![CDATA[<p>Zumindest ist das eine übliche Größe für int.</p>
<p>Und wieviel Bytes gibst du beim cout aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2457957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2457957</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Sat, 27 Jun 2015 15:50:48 GMT</pubDate></item></channel></rss>