title: c++ save and load game with pointers in structs
body: <p>I know I can use:</p>
  
  <pre><code>MyGame  game; // the game object
  //
  
  ofstream out("mygame.bin", ios::binary);
  out.write((char *)&amp;game, sizeof(MyGame));
  </code></pre>
  
  <p>to save and load the game, but what if I have pointers inside MyGame structure? will the pointers just be saved but not the data it points to?</p>
  
  <p>and: how to solve this?</p>