title: Char array to hex string C++
body: <p>I searched <code>char*</code> to <code>hex</code> string before but implementation I found adds some non-existent garbage at the end of <code>hex</code> string. I receive packets from socket, and I need to convert them to <code>hex</code> strings for log (null-terminated buffer). Can somebody advise me a good implementation for <code>C++</code>?</p>
  
  <p>Thanks!</p>