title: Is there a way to fix this error : no match for 'operator[]' (operand types are 'empl' and 'int')
body: <p>Im getting homework done but i faced this problem i tried everything changing variables name, changing function ....
  I looked into this problem on google still no idea how to fix this error.</p>
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;iostream&gt;
  
  struct empl {
      char nom;
      char pre;
      float salaire;
      double cin;
  }empl;
  struct empl t[50];
  struct empl E;
  
  int taille(int n)
  {
      printf(&quot;saisie la taille de tableaux\n&quot;);
      scanf(&quot;%d\n&quot;, &amp;n);
      return 0;
  }
  
  int remplire(int n, struct empl t, int i)
  
  {
      for (i = 1; i &lt;= n; i++)
      {
          printf(&quot;t[%d].nom= &quot;, i);
          scanf(&quot;%s\n&quot;, &amp;t[i].nom);
          printf(&quot;t[%d].prenom= &quot;, i);
          scanf(&quot;%s\n&quot;, &amp;t[i].pre);
          printf(&quot;t[%d].salaire= &quot;, i);
          scanf(&quot;%f\n&quot;, &amp;t[i].salaire);
          printf(&quot;t[%d].CIN= &quot;, i);
          scanf(&quot;%lf\n&quot;, &amp;t[i].cin);
      }
  }
  int main()
  {
      int i, n;
      int taille(int n),
          taille(n);
      int remplire(int n, struct empl t, int i);
      remplire(n, t, i);
  }
  </code></pre>