title: Converting hex to dec C++
body: <p>Convert to hex:</p>
  
  <pre><code>cout &lt;&lt; hex &lt;&lt; int(x) &lt;&lt; endl;
  </code></pre>
  
  <p>How to convert conversely, from hex to dec?</p>
  
  <p>Enter hex number simple:</p>
  
  <pre><code>cin &gt;&gt; hex &gt;&gt; x;
  </code></pre>