title: Printing out an array
body: <p>I am printing out an array to a .txt file. I have not discussed the array definition/formulation here, because its complex.   </p>
  
  <p>To give a background, its a 2D array and I wish to write the data from the array to another file on my computer. I am using the following code. The problem is I am unable to compile the code and the error points to this section of the code. Could anyone please point out what is wrong in the data implementation with this?</p>
  
  <pre><code>   ofstream outFile;
     outFile.open("matrix.txt");
  
     for (int i=0; i&lt;6; i++){
      for (int j=0; j&lt;3; j++){
      ofstream &lt;&lt; matrix[i][j];
      }}
     outFile.close();
  </code></pre>