title: char pointers: invalid conversion from 'char*' to 'char'?
body: <p>I cut out all the unnecessary code so no one gets too bored with my question... So I cant get the char array to work! on the last few lines of    </p>
  
  <pre><code>*whatname = guyname; 
  *whatlastname = lastname;
  </code></pre>
  
  <p>I get an error saying  invalid conversion from 'char*' to 'char'. Help would be much appreciated!</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;string.h&gt;
  
  void getname(char *whatname, char *whatlastname);
  
  int main()
  {
      int option = 0;
      char guyname = 'x';
      char lastname = 'x';
      bool name_entered = false;
  
      do{
          printf("1. Enter name.\n");
          printf("2. Enter exam scores.\n");
          printf("3. Display average exam scores. \n");
          printf("4. Display summary. \n");
          printf("5. Quit. \n");
          scanf("%i", &amp;option);
  
          if( option == 1 )
          {
              name_entered = true;
              getname(&amp;guyname, &amp;lastname);
          }
      else if( option == 4 )
      {
          {
              printf("%s %s based on your exam scores of \n",guyname, lastname);
          }
          else
          {
              printf("Please enter your name in option 1 and you exam scores in option 2 before continuing.\n");
          }
      }
          else if( option == 5 )
          {
              printf(" Come back with a better grade next time.");
              break;
          }
      }while (!(option &gt;5 || option &lt;1));
      return 0;
  }
  
  void getname (char *whatname, char *whatlastname)
  {
      char guyname[32];
      char lastname[32];
      printf("Enter your first and last name : ");
      scanf("%s %s", &amp;guyname, &amp;lastname);
  
      guyname[0] = toupper( guyname[0] );
      int len = strlen(guyname);
      for(int i=1; i&lt;len ; i++)
      {
          guyname[i] = tolower( guyname[i]);
      }
  
      lastname[0] = toupper( lastname[0] );
      int len1 = strlen(lastname);
      for(int k=1; k&lt;len1; k++)
      {
          lastname[k]= tolower( lastname[k]);
      }
  
      printf("Your name is %s %s\n", guyname, lastname);
      *whatname = guyname;
      *whatlastname = lastname;
  }
  </code></pre>