<?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[string mit hex-werten =&amp;gt; array der hexwerte]]></title><description><![CDATA[<p>hi,</p>
<p>ich habe einen string mit hex-werten, bspw. &quot;0f8d&quot;.<br />
diesen moechte ich nun in ein array dieser hex-werte konvertieren (-&gt;kein string/keine ascii-werte mehr), also myCharArray == 0xf08d.</p>
<p>ich habe keine ahnung, wie ich das am besten anstelle, gibt es da evtl. etwas aus der standard lib?<br />
falls nein, wie implementiere ich so etwas am besten?</p>
<p>mfg,<br />
julian</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/245693/string-mit-hex-werten-gt-array-der-hexwerte</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 14:41:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/245693.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Jul 2009 11:47:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to string mit hex-werten =&amp;gt; array der hexwerte on Fri, 17 Jul 2009 11:47:48 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>ich habe einen string mit hex-werten, bspw. &quot;0f8d&quot;.<br />
diesen moechte ich nun in ein array dieser hex-werte konvertieren (-&gt;kein string/keine ascii-werte mehr), also myCharArray == 0xf08d.</p>
<p>ich habe keine ahnung, wie ich das am besten anstelle, gibt es da evtl. etwas aus der standard lib?<br />
falls nein, wie implementiere ich so etwas am besten?</p>
<p>mfg,<br />
julian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1744774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744774</guid><dc:creator><![CDATA[Julian__]]></dc:creator><pubDate>Fri, 17 Jul 2009 11:47:48 GMT</pubDate></item><item><title><![CDATA[Reply to string mit hex-werten =&amp;gt; array der hexwerte on Fri, 17 Jul 2009 11:52:51 GMT]]></title><description><![CDATA[<p>Schau dir mal folgende Dinge an:</p>
<ul>
<li><code>std::stringstream</code> um Werte umzuwandeln - <a href="http://www.cplusplus.com/reference/iostream/stringstream/" rel="nofollow">http://www.cplusplus.com/reference/iostream/stringstream/</a></li>
<li><code>std::hex</code> für hexadezimales Format - <a href="http://www.cplusplus.com/reference/iostream/manipulators/hex/" rel="nofollow">http://www.cplusplus.com/reference/iostream/manipulators/hex/</a></li>
<li><code>std::vector</code> (statt Array) - <a href="http://www.cplusplus.com/reference/stl/vector/" rel="nofollow">http://www.cplusplus.com/reference/stl/vector/</a></li>
</ul>
]]></description><link>https://www.c-plusplus.net/forum/post/1744778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744778</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Fri, 17 Jul 2009 11:52:51 GMT</pubDate></item><item><title><![CDATA[Reply to string mit hex-werten =&amp;gt; array der hexwerte on Fri, 17 Jul 2009 16:47:47 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Vom Ansatz her ist die Funktion <em>strtoul</em> eine Option.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1744947</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744947</guid><dc:creator><![CDATA[convert0r]]></dc:creator><pubDate>Fri, 17 Jul 2009 16:47:47 GMT</pubDate></item><item><title><![CDATA[Reply to string mit hex-werten =&amp;gt; array der hexwerte on Fri, 17 Jul 2009 17:48:24 GMT]]></title><description><![CDATA[<p>Oder so?</p>
<pre><code class="language-cpp">long hexstr_to_dec ( string hex_str )  
{ 
    stringstream s; 
	unsigned num = 0;
	s &lt;&lt; hex &lt;&lt; hex_str;
	s &gt;&gt;  num;
	return num;
} 
cout &lt;&lt; hexstr_to_dec ( &quot;F&quot;);
	cout &lt;&lt; hexstr_to_dec ( &quot;0xF&quot;);
	cout &lt;&lt; hexstr_to_dec ( &quot;-A&quot;);
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1744975</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744975</guid><dc:creator><![CDATA[experimentat0r]]></dc:creator><pubDate>Fri, 17 Jul 2009 17:48:24 GMT</pubDate></item></channel></rss>