title: Problems with syntax c++
body: <p>I'm having problems with: (all line 34)</p>
  
  <ol>
  <li>expected unqualified-id before "for"</li>
  <li>expected constructor, destructor, or type conversion before '!=' token</li>
  <li>expected <code>,' or</code>;' before "for"</li>
  <li>`i' was not declared in this scope</li>
  </ol>
  
  <p>And i can't seem to find a solution, i've looked for sintax errors, but it seems fine to me.
  Any help appreciated. Thanks!</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  using namespace std;
  
  int main(int arg[], int length)
  {
      char c [3];
      char r [5];
      int i;
      for (i=0; i &lt; 3; i++)
      {
      cout &lt;&lt; "Inserisci i numeri delle colonne: (3 numeri) ";
      cin &gt;&gt; c[i];
      }
      for (i=0; i &lt; 5; i++)
      {
      cout &lt;&lt; "Inserisci i numeri delle righe: (5 numeri) ";
      cin &gt;&gt; r[i];
      }
      ofstream fout("DatiArray.txt");
      if(fout.is_open())
      {
      cout &lt;&lt; "File aperto con successo!\n";
      }
      i=0;
       for(i=0; c[i] !='\0'; i++)
         {
         fout &lt;&lt; c[i];
         } 
          cout &lt;&lt; "Dati delle colonne scritti nel file DatiArray.txt con successo!\n";
          }
  
           for ( i=0; r[i] !='\0'; i++)  // this line 
          {
          fout &lt;&lt; r[i];
          }
           cout &lt;&lt; "Dati delle righe scritti nel file DatiArray.txt con successo!\n";
           }
  
   system ("PAUSE");    
  }
  </code></pre>