title: is it possible to simply serialize C++ objects
body: <p>Can you cast an object to a string of hex data (similar to how packets are sent) and then store that and then cast the object back? I know its possible with C structs which are basically objects undearneath in C++.</p>
  
  <p>Compatibility of the serialization across different systems isn't important.</p>
  
  <pre><code>auto obj = new Something();
  
  auto objHex = (unsigned char*) obj;
  
  // store objHex in like a db
  // retrieve objHex
  
  auto obj2 = new Something();  // allocate
  *obj2 = (Something*) objHex;  // set the dereference
  </code></pre>