title: Writing 3D array to text file and then reading text file into array
body: <p>After printing the deck to the screen, I want to save this 3D array into a text file. And ultimately be able to read this text file back into a deck of sorts. However, when I do all I get for a text file is "usdeck" represented in hex. I tried putting the below code but it doesnt work...help?</p>
  
  <pre><code>ofstream myfile;
  myfile.open ("unshuffled deck.txt");
  myfile &lt;&lt; usdeck;
  myfile.close;
  
  
  // deck of cards
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  using namespace std;
  
  int main()
  {
  const char usdeck[4][13][14] = 
  {
  {"heart two", "heart three", "heart four",
  "heart five", "heart six", "heart seven",
  "heart eight","heart nine", "heart ten",
  "heart jack","heart queen", "heart king",
  "heart ace"},
  {"diamond two", "diamond three", "diamond four",
  "diamond five", "diamond six", "diamond seven",
  "diamond eight", "diamond nine", "diamond ten",
  "diamond jack", "diamond queen", "diamond king",
  "diamond ace"},
  {"club two", "club three", "club four", "club five",
  "club six", "club seven", "club eight", "club nine",
  "club ten", "club jack", "club queen", "club king",
  "club ace"},
  {"spade two", "spade three", "spade four",
  "spade five", "spade six", "spade seven",
  "spade eight", "spade nine", "spade ten",
  "spade jack", "spade queen", "spade king",
  "spade ace"}
  };
  
  for(int row=0;row&lt;4; row++)
  {
  for(int column=0;column&lt;13;column++)
      {
      for(int element=0;element&lt;14;element++)
          {
      cout &lt;&lt; usdeck[row][column][element] &lt;&lt; " ";
          }
      cout &lt;&lt;endl;
  }
  }
  
  
  return 0;
  
  }
  </code></pre>