title: How to convert string into hex value
body: <p>I am trying to convert string value into its hex form, but not able to do.
  Following is the C++ code snippet, with which I am trying to do.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;string&gt;
  #define __STDC_FORMAT_MACROS
  #include &lt;inttypes.h&gt;
  
  using namespace std;
  
  int main()
  {
  
      string hexstr;
      hexstr = "000005F5E101";
      uint64_t Value;
      sscanf(hexstr.c_str(), "%" PRIu64 "", &amp;Value);
      printf("value = %" PRIu64 " \n", Value);
  
      return 0;
  }
  </code></pre>
  
  <p>The Output is only 5, which is not correct.</p>
  
  <p>Any help would be highly appreciated.
  Thanks,
  Yuvi</p>