title: c++ Array output has trash memory values
body: <p>I was making practice on arrays in c++ I got trash memory values, how can I fix it thanks</p>
  
  <pre><code>#include&lt;cstdlib&gt;
  #include&lt;fsream&gt;
  #include&lt;iostream&gt;
  #include&lt;locale.h&gt;
  #include&lt;string.h&gt;
  
  using namespace std;
  
  string sone;
  string stwo;
  string sthree;
  string sfour;
  
  int one;
  int two;
  int three;
  int four;
  
  int main(int org, char** argv)
  {
  
      char array = { 'a', 'b', 'c', 'd' };
      while (four &lt;= 10)
      {
          three = 0
          while (three &lt;= 10)
          {
              two = 0
              while (two &lt;= 10)
              {
                  one = 0
                  while (one &lt;= 10)
                  {
                      setlocale(LC_CTYPE, "Local");
                      ofstream out("file.txt", ios::app);
                      sone = array[one];
                      stwo = array[two];
                      sthree = array[three];
                      sfour = array[four];
                      out &lt;&lt; sfour + sthree + stwo + sone;
                      out &lt;&lt; "\n";
                      out.close();
                      one++;
                  }
                  two++;
              }
              four++;
          }
          five++;
      }
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>1-aaaa   
  2-aaab   
  3-aaac   
  4-aaad   
  5-aaa#   
  6-aaa?   
  7-aaa0   
  8-aaa#  
  9-aaa'   
  10-aaa_  
  11-aaa?  
  12-aaba  
  13-aabb  
  </code></pre>