title: User defined Class Serialization, C++ and msgpack
body: <p><br>
  I am quite new trying msgpack. I need to serialize an object (instance of an user defined class), that contains pointers (internal tree, hashes,etc), and some basic types attributes.</p>
  
  <p>Until now I can do what is done in the quick example of msgpack.org wiki, just serialize the class to a <code>msgpack::sbuffer</code>, and then read the buffer to unserialize. </p>
  
  <p>But now, I want to send that buffer to a file, or the serialization result to a file and then unserialize it.<br>
  Can anyone give me some tip on how to do it? I browse and read enough to get tired of it :)</p>
  
  <p>My code look like this: </p>
  
  <pre><code>msgpack::sbuffer sbuf;
  msgpack::pack(sbuf, cluster); //cluster is the instance of my class clustering
  
  //HERE I SHOULD SEND THE BUFFER TO A STREAM FILE, AND THEN LOAD IT IN THE UNPACK;
  
  msgpack::unpacked msg;
  msgpack::unpack(&amp;msg, sbuf.data(), sbuf.size()); 
  msgpack::object obj = msg.get();
  clustering clustUnser
  obj.convert(&amp;clustUnser);
  </code></pre>
  
  <p>thanks everybody!<br>
  bests,<br>
  Luchux.</p>