title: Error: Cannot convert argument 1 from 'char [80]' to 'char'
body: <p>I'm trying to pass an int to a struct. I have to validate it and the class instructions say I have to run it through a function. </p>
  
  <p>Here's the error message: </p>
  
  <p><code>C2664: 'int get_id(char)' : cannot convert argument 1 from 'char [80]' to 'char'</code></p>
  
  <pre><code> #define _CRT_SECURE_NO_WARNINGS
      #include &lt;stdio.h&gt;
      #include &lt;conio.h&gt;
      #include &lt;stdlib.h&gt;
      #include &lt;cstdio&gt;
      #include &lt;iostream&gt;
      #include &lt;fstream&gt;
      #include &lt;cstring&gt;
      #include &lt;exception&gt;
  
  
  //functions called
  int get_id(char);
  
  //structs
  struct fileinfo
  {
      int id;
      char name[20];
      char state[5];
      char dis_code;
      float balance;
      char due_date[40];
  };
  
  
  //why is it void?
  int main(void)
  {
      fileinfo info[80];
  
      int ct = 0;
      char more = 'y';
      char buff[80];
  
      while (more == 'y')
      {
  
          printf("ID: ");
          gets_s(buff);
  
          info[ct].id = get_id(buff);
          printf("this is ID: %i", info[ct].id);
  
          printf("Do you want to enter another? ");
          gets_s(buff);
          more = buff[0];
      }
  
      system("pause");
  
  }//end main
  
  int get_id(char buf[])
  {
      int id;
      char buffer[85];
      bool check = false;
  
      id = atoi(buf);
      while (check == false)
      {
          if (id &gt; 998)
          {
              printf("\n This ID number is too large, please re-enter: ");
              gets_s(buffer);
              id = atoi(buffer);
              check = false;
          }
          else
          {
              check = true;
          }
      }
  
      return id;
  }
  </code></pre>