title: C4302 reinterpret_cast truncation from const _Elem * to unsigned char
body: <p>Hi got this message which I need help with:</p>
  <p>Severity    Code    Description Project File    Line    Suppression State Warning   C4302   'reinterpret_cast': truncation from 'const _Elem *' to 'unsigned char' row 94</p>
  <p>Severity    Code    Description Project File    Line    Suppression State Warning   C4302   'reinterpret_cast': truncation from 'const _Elem *' to 'unsigned char' row 95</p>
  <pre><code>    uint16_t Id = 325;
  std::stringstream stream;
  stream &lt;&lt; std::setfill('0') &lt;&lt; std::setw(4) &lt;&lt; std::hex &lt;&lt; Id; //Result: 0145
  std::string str1 = stream.str().substr(0, 2); //Result: 01
  std::string str2 = stream.str().substr(2, 2); //Result: 45
  unsigned char char1 = reinterpret_cast&lt;unsigned char&gt;((&quot;0x&quot; + str1).c_str()); //Wanted result: 0x01
  unsigned char char2 = reinterpret_cast&lt;unsigned char&gt;((&quot;0x&quot; + str1).c_str()); //Wanted result: 0x45
  unsigned char Mac[6] = { 0x00, 0x1D, 0xE2, 0x03, char1, char2 };
  </code></pre>