<?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[Problem mit binhexdec Konverter]]></title><description><![CDATA[<p>Hallöchen!</p>
<p>Ich habe einen binhexdec Konverter programmiert, der bis auf eine Ausnahme auch wunderbar funktioniert.</p>
<p>aber wenn der Part hex nach dec benutzt wurde, funktioniert der Part dec nach hex plötzlich nicht mehr.</p>
<p>hex - dec Part:</p>
<pre><code class="language-cpp">case 3:
               {

               /////////////////////////////////// 
               ////////// 3. HEX -&gt; DEZ //////////
               ///////////////////////////////////                

                  system(&quot;cls&quot;);
                  cout&lt;&lt;&quot;&gt;&gt;HEX -&gt; DEZ&lt;&lt;&quot;&lt;&lt;endl&lt;&lt;endl;                         
                  cout&lt;&lt;&quot;Bitte umzuwandelnde Zahl eingeben&quot;&lt;&lt;endl;                               

                  cin&gt;&gt;hex&gt;&gt;hdx;

                  cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;dec&lt;&lt;hdx&lt;&lt;endl;

               getch ();  
               }
                 break;
</code></pre>
<p>dec - hex Part:</p>
<pre><code class="language-cpp">case 4:
               {

               /////////////////////////////////// 
               ////////// 4. DEZ -&gt; HEX //////////
               ///////////////////////////////////                

                  system(&quot;cls&quot;);
                  cout&lt;&lt;&quot;&gt;&gt;DEZ -&gt; HEX&lt;&lt;&quot;&lt;&lt;endl&lt;&lt;endl;                             
                  cout&lt;&lt;&quot;Bitte umzuwandelnde Zahl eingeben&quot;&lt;&lt;endl;                
                  cin&gt;&gt;dhx;                                                         
                  cout&lt;&lt;endl;                                                     

                  for (dhx;dhx&gt;0; )                                                    
                   {                                                                 
                    dhy=dhx%16;                                                                 
                    dhx=dhx/16;                                                                 
                    dhf--;                                                          
                    dhfeld[dhf]=dhy;                                                    
                   }                                                              
                  dhtemp=dhf;     

                  cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;;                                 
                  for ( ;dhf&lt;100; )                                                 
                   {                                                              
                    if (dhfeld[dhf]&lt;=9)                                               
                     cout&lt;&lt;dhfeld[dhf];                                               
                    if (dhfeld[dhf]==10)                                                                                       
                     cout&lt;&lt;&quot;A&quot;;                                                   
                    if (dhfeld[dhf]==11)                                              
                     cout&lt;&lt;&quot;B&quot;;                                                   
                    if (dhfeld[dhf]==12)                                              
                     cout&lt;&lt;&quot;C&quot;;                                                   
                    if (dhfeld[dhf]==13)                                              
                     cout&lt;&lt;&quot;D&quot;;                                                   
                    if (dhfeld[dhf]==14)                                              
                     cout&lt;&lt;&quot;E&quot;;                                                   
                    if (dhfeld[dhf]==15)                                              
                     cout&lt;&lt;&quot;F&quot;;                                                   
                    dhf++;                                                              
                   }

               getch ();  
               }
                 break;
</code></pre>
<p>Ich wollte nicht das ganze Programm posten weil es recht lang ist, aber auf Wunsch kann ichs natürlich tun.<br />
Das Hauptprogramm befindet sich in einer abbrechbaren Endlosschleife, zu Beginn dieser Schleife werden alle Variablen wieder zurückgesetzt.</p>
<p>Woran kann es liegen?<br />
Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/232837/problem-mit-binhexdec-konverter</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 04:53:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/232837.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 27 Jan 2009 21:02:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit binhexdec Konverter on Tue, 27 Jan 2009 21:02:19 GMT]]></title><description><![CDATA[<p>Hallöchen!</p>
<p>Ich habe einen binhexdec Konverter programmiert, der bis auf eine Ausnahme auch wunderbar funktioniert.</p>
<p>aber wenn der Part hex nach dec benutzt wurde, funktioniert der Part dec nach hex plötzlich nicht mehr.</p>
<p>hex - dec Part:</p>
<pre><code class="language-cpp">case 3:
               {

               /////////////////////////////////// 
               ////////// 3. HEX -&gt; DEZ //////////
               ///////////////////////////////////                

                  system(&quot;cls&quot;);
                  cout&lt;&lt;&quot;&gt;&gt;HEX -&gt; DEZ&lt;&lt;&quot;&lt;&lt;endl&lt;&lt;endl;                         
                  cout&lt;&lt;&quot;Bitte umzuwandelnde Zahl eingeben&quot;&lt;&lt;endl;                               

                  cin&gt;&gt;hex&gt;&gt;hdx;

                  cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;&lt;&lt;dec&lt;&lt;hdx&lt;&lt;endl;

               getch ();  
               }
                 break;
</code></pre>
<p>dec - hex Part:</p>
<pre><code class="language-cpp">case 4:
               {

               /////////////////////////////////// 
               ////////// 4. DEZ -&gt; HEX //////////
               ///////////////////////////////////                

                  system(&quot;cls&quot;);
                  cout&lt;&lt;&quot;&gt;&gt;DEZ -&gt; HEX&lt;&lt;&quot;&lt;&lt;endl&lt;&lt;endl;                             
                  cout&lt;&lt;&quot;Bitte umzuwandelnde Zahl eingeben&quot;&lt;&lt;endl;                
                  cin&gt;&gt;dhx;                                                         
                  cout&lt;&lt;endl;                                                     

                  for (dhx;dhx&gt;0; )                                                    
                   {                                                                 
                    dhy=dhx%16;                                                                 
                    dhx=dhx/16;                                                                 
                    dhf--;                                                          
                    dhfeld[dhf]=dhy;                                                    
                   }                                                              
                  dhtemp=dhf;     

                  cout&lt;&lt;&quot;Das Ergebnis lautet: &quot;;                                 
                  for ( ;dhf&lt;100; )                                                 
                   {                                                              
                    if (dhfeld[dhf]&lt;=9)                                               
                     cout&lt;&lt;dhfeld[dhf];                                               
                    if (dhfeld[dhf]==10)                                                                                       
                     cout&lt;&lt;&quot;A&quot;;                                                   
                    if (dhfeld[dhf]==11)                                              
                     cout&lt;&lt;&quot;B&quot;;                                                   
                    if (dhfeld[dhf]==12)                                              
                     cout&lt;&lt;&quot;C&quot;;                                                   
                    if (dhfeld[dhf]==13)                                              
                     cout&lt;&lt;&quot;D&quot;;                                                   
                    if (dhfeld[dhf]==14)                                              
                     cout&lt;&lt;&quot;E&quot;;                                                   
                    if (dhfeld[dhf]==15)                                              
                     cout&lt;&lt;&quot;F&quot;;                                                   
                    dhf++;                                                              
                   }

               getch ();  
               }
                 break;
</code></pre>
<p>Ich wollte nicht das ganze Programm posten weil es recht lang ist, aber auf Wunsch kann ichs natürlich tun.<br />
Das Hauptprogramm befindet sich in einer abbrechbaren Endlosschleife, zu Beginn dieser Schleife werden alle Variablen wieder zurückgesetzt.</p>
<p>Woran kann es liegen?<br />
Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1653515</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653515</guid><dc:creator><![CDATA[Psychedelixx]]></dc:creator><pubDate>Tue, 27 Jan 2009 21:02:19 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit binhexdec Konverter on Tue, 27 Jan 2009 21:12:14 GMT]]></title><description><![CDATA[<p>hat nix mit der frage zu tun, aber</p>
<pre><code class="language-cpp">if (dhfeld[dhf]==10)                                                                                       
                     cout&lt;&lt;&quot;A&quot;;                                                   
                    if (dhfeld[dhf]==11)                                              
                     cout&lt;&lt;&quot;B&quot;;                                                   
                    if (dhfeld[dhf]==12)                                              
                     cout&lt;&lt;&quot;C&quot;;                                                   
                    if (dhfeld[dhf]==13)                                              
                     cout&lt;&lt;&quot;D&quot;;                                                   
                    if (dhfeld[dhf]==14)                                              
                     cout&lt;&lt;&quot;E&quot;;                                                   
                    if (dhfeld[dhf]==15)                                              
                     cout&lt;&lt;&quot;F&quot;;
</code></pre>
<p>zerfällt zu</p>
<pre><code class="language-cpp">'A'+(dhfeld[dhf]-10)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1653521</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653521</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Tue, 27 Jan 2009 21:12:14 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit binhexdec Konverter on Tue, 27 Jan 2009 22:00:47 GMT]]></title><description><![CDATA[<p>danke!</p>
<p>aber könnte mir bitte jemand die Syntax dazu kurz erläutern? Ich verstehe gerne, bevor ich einfach Dinge einbaue <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>
<p>Und mein Problem oben?!<br />
Grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1653548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653548</guid><dc:creator><![CDATA[Psychedelixx]]></dc:creator><pubDate>Tue, 27 Jan 2009 22:00:47 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit binhexdec Konverter on Tue, 27 Jan 2009 22:04:13 GMT]]></title><description><![CDATA[<p>(dhfeld[dhf]-10) ist halt 0 1 2 3... wenn dhfeld[dhf] 10 11 12 13... ist.<br />
und das addiere ich zum ASCII-code von A. der ist 'A'.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1653550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653550</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Tue, 27 Jan 2009 22:04:13 GMT</pubDate></item></channel></rss>