title: Error: Array type has incomplete element type and binary operand error
body: <p>I am trying to make a multi-program database in C. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include "function.c"
  
  
  int main()
  {
  info();
  example();
  
  printf("\n\n\n");
  
  char name[1][10], id[1][10], grade[1][1];
  char choice;
  int x=0;
  int sal[1];
  FILE *fp;
  
  printf("Would you like to continue? Y/N: ");
  scanf("%c",&amp;choice);
  fflush(stdin);
  
  if(choice == 'Y' || choice == 'y')
  {
      system("cls");
  
      fp = fopen("database.txt","w");
  
      if(fp == NULL)
      {
          printf("File does not exist!");
          return 0;
      }
      else
      {
          while(x&lt;=1)
          {
              printf("Enter Employee name no.%d: ",(x+1));
              scanf("%s",name[x]);
              fprintf(fp, "Employee Name: %s\n",name);
  
              printf("Enter Employee ID: ");
              scanf("%s",id[x]);
              fprintf(fp, "Employee ID: %s\n",id);
  
              printf("Enter Employee Grade Level (A-E): ");
              scanf("%s",grade[x]);
              fprintf(fp, "Employee Grade Level: %s\n",grade);
  
              printf("Enter Employee's Basic Salary: ");
              scanf("%d",&amp;sal[x]);
              fprintf(fp, "Employee's Basic Salary: %d\n\n\n",sal);
  
              printf("Employee's bonus: %d\n",bonus(grade[x],sal[x]));
  
              printf("Employee's allowance: %d\n",allowance(grade[x], sal[x]));
  
              printf("\n");
          }
      }   
      fclose(fp);
  }
  else
  {
      return 0;
  }
  
  
  
  
  return 0;
  }
  </code></pre>
  
  <p>function.c  :</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include "function.h"
  
  int bonus(char *grade[1][], int *sal[])
  {
  int bonus;
  int *b;
  int x;
  
  b = &amp;bonus;
  
  for(x=0;x&lt;=1;x++)
  {
  
      switch(*grade[x])
      {
          case 'A':
              bonus = (1/4) * *sal[x];
              break;
          case 'B':
              bonus = (1/5) * *sal[x];
              break;
          case 'C':
              bonus = (15/100) * *sal[x];
              break;
          case 'D':
              bonus = (1/10) * *sal[x];
              break;
          case 'E':
              bonus = (5/100) * *sal[x];
              break;
          default:
              printf("Invalid Choice!!");
              break;
      }
  
      return bonus;
      }
  }
  
  int allowance(char *grade[1][], int *sal[])
  {
  int all;
  int *a;
  int x;
  
  a = &amp;all;
  
  for(x=0;x&lt;=1;x++)
  {
      switch(*grade[x])
      {
      case 'A':
          all = (3/10) * *sal[x];
          break;
      case 'B':
          all = (6/25) * *sal[x];
          break;
      case 'C':
          all = (9/50) * *sal[x];
          break;
      case 'D':
          all = (3/25) * *sal[x];
          break;
      case 'E':
          all = (3/50) * *sal[x];
          break;
      default:
          printf("Invalid Choice!!");
          break;
      }
  
      return all;
      }
  
  }
  </code></pre>
  
  <p>function.h:</p>
  
  <pre><code>#ifndef _FUNCTION_H_INCLUDED
  #define _FUNCTION_H_INCLUDED
  
  int bonus(char *grade[][], int *sal[]); //prototype for calculating bonus
  int allowance(char *grade[][], int *sal[]); //prototype for allowance
  void info(); //prototype for information
  void example(); //prototype for example
  
  #endif
  </code></pre>
  
  <p>When I try to compile the program, I get: </p>
  
  <pre><code>2   0   function.c  In file included from function.c
  4   17  function.h  [Error] array type has incomplete element type
  5   21  function.h  [Error] array type has incomplete element type
  4   17  function.c  [Error] array type has incomplete element type
  function.c  In function 'bonus':
  18  19  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  21  19  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  24  22  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  27  20  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  30  21  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  function.c  At top level:
  41  21  function.c  [Error] array type has incomplete element type
  function.c  In function 'allowance':
  54  17  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  57  17  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  60  17  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  63  17  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  66  17  function.c  [Error] invalid operands to binary * (have 'int' and 'int *')
  </code></pre>
  
  <p>I do not know what the problem is (I'm a beginner in C programming).</p>
  
  <p>My first question: What does array type has incomplete element type mean?
  Next question: Why am I still getting the invalid operands to binary * error?</p>
  
  <p>Any help would be appreciated. </p>