title: Conversion between const void* to char
body: <p>How can I convert between <code>const void*</code> to <code>char</code>?</p>
  
  <p>Using C++ casts only.</p>
  
  <pre><code>void foo( const void* data)
  {
     char bar = static_cast&lt;char&gt;(data); // error: invalid static_cast from type 'const void*' to type 'char'
     printf( "foo: %d\n", bar);
  }
  </code></pre>