title: snprintf c++ alternative
body: <p>How can I convert this code from C into C++ ?</p>
  
  <pre><code>char out[61]; //null terminator
  for (i = 0; i &lt; 20; i++) {
      snprintf(out+i*3, 4, "%02x ", obuf[i])
  }
  </code></pre>
  
  <p>I can't find any alternative for <code>snprintf</code>.</p>