title: C++ console Save and load saved "games"
body: <p>I have a grid of randomly generated numbers of size <code>gameSize</code>x<code>gameSize</code> (user input) which is contained within a vector of vectors. The user can enter  two co-ordinates (x, y) so that it changes a number within the grid to a predefined value.</p>
  
  <p>So for example the user enters, X:0 Y:0 and:</p>
  
  <pre><code>{9, 7, 9}
  
  {9, 6, 8}
  
  {5, 1, 4}
  </code></pre>
  
  <p>becomes:</p>
  
  <pre><code>{0, 7, 9} &lt;-- Changes position 0,0 to 0 (the predefined value)
  
  {9, 6, 8} 
  
  {5, 1, 4}
  </code></pre>
  
  <p>I'm trying to figure out how to make it so the user can save the current board state and access it later on. I understand I need to somehow save the game (myGame) to a file, that way I can access it and load it into the console application again, essentially saving and restarting saved games, but I have no clue where to begin.</p>