title: How to write the content of an array into a text file?
body: <p>How to write the content of an array to a text file?
  Is it possible?</p>
  
  <p>Below is my code:</p>
  
  <pre><code>x=0;
  y=0;
  //copy to real array
  if(nRow == 0){
      for(i=nTCol; i&gt;=0 ; i--){
          nPanelMap[nRow][x] = nTempMap[i];
          x++;
      }
  
  }
  if(nRow == 1){
      for (i=nTCol; i&gt;=0 ; i--){
          nPanelMap[nRow][y] = nTempMap[i];
          y++;
      }
  }
  k=0;
  
  for (i=nTCol; i&gt;=0 ; i--){
      array [k] = nPanelMap[nRow][x];
      k++;
      array [k] = nPanelMap[nRow][y];
      k++;
  
  }
  j=0;
  for (i=nTCol; i&gt;=0 ; i--){
  
      nPanelMap[nRow][j] = array [k];
      j++;
  }
  nRow++;
  </code></pre>
  
  <p>I would like to print out arrays <code>x</code>, <code>y</code>, <code>k</code>, and <code>j</code> and write them into a text file.
  The purpose of doing this is to ensure that the data passing is correct.</p>