title: Error: cannot convert 'char*' to 'char**' for argument '1' to 'int upper(char**)'
body: <p>I have an assignment to calculate the number of vowels,capital letters, consonants etc. in an array. But I keep getting the
  error:</p>
  
  <blockquote>
    <p>Error cannot convert 'char*' to 'char** ' for argument '1' to
    'int upper(char**)'</p>
  </blockquote>
  
  <p>I have no idea why I get this error.</p>
  
  <p>My main program:</p>
  
  <pre><code>#include "stringCount.h"
  using namespace std;
  
  int main()
  {
      const int SIZE = 1024;  // The maximum size of the C-string
      char cstring[SIZE];     
      char choice;        
  
      cout &lt;&lt; "Enter a C-string of at most 1024 characters: ";
      cin.getline(cstring, SIZE); //Get a c-string
  
      // Display the Menu
  
     do
     {
        cout &lt;&lt; "\tA) Count the number of vowels in the string\n";
        cout &lt;&lt; "\tB) Count the number of consonants in the string\n";
        cout &lt;&lt; "\tC) Count the number of uppercase alphabets in the string\n";
        cout &lt;&lt; "\tD) Count the number of lowercase alphabets in the string\n";
        cout &lt;&lt; "\tE) Count the number of alphabets in the string\n";
        cout &lt;&lt; "\tF) Count the number of digits in the string\n";
        cout &lt;&lt; "\tG) Find the average number character in each word of the string\n";
        cout &lt;&lt; "\tH) Display the string with first letter of words capitalized\n";
        cout &lt;&lt; "\tI) Enter a new string string\n";
        cout &lt;&lt; "\tQ) Quit this program\n\n";
  
        cout &lt;&lt; "\tEnter your choice (A - I) or Q: ";
        cin &gt;&gt; choice;
  
        while ((toupper(choice) &lt; 'A' || toupper(choice) &gt; 'I') &amp;&amp; toupper(choice)!='Q')
        {
           cout &lt;&lt; "\tEnter ONLY (A - I) or Q: ";
           cin &gt;&gt; choice;
        }
  
          // Process User's choice
        switch (toupper(choice))
        {
           case 'A':   cout &lt;&lt; "The string has " &lt;&lt; vowel(cstring) &lt;&lt; " vowels." &lt;&lt; endl;
                       break;
           case 'B':   cout &lt;&lt; "The string has " &lt;&lt; consonant(cstring) &lt;&lt; " consonants." &lt;&lt; endl;
                       break;
          case 'C':   cout &lt;&lt; "There are " &lt;&lt; upper(cstring) &lt;&lt; " uppercase alphabets in the string." &lt;&lt; endl;
                       break;
          case 'D':   cout &lt;&lt; "There are " &lt;&lt; lower(cstring) &lt;&lt; " lowercase alphabets in the string." &lt;&lt; endl;
                       break;
          case 'E':   cout &lt;&lt; "There are " &lt;&lt; alphabet(cstring) &lt;&lt; " alphabets in the string." &lt;&lt; endl;
                       break;
          case 'F':   cout &lt;&lt; "There are " &lt;&lt; digit(cstring) &lt;&lt; " digits in the string." &lt;&lt; endl;
                       break;
              case 'G':   cout &lt;&lt; "There average number of letters per word in the string is " &lt;&lt; wordCount(cstring) &lt;&lt; "." &lt;&lt; endl;
                       break;
              case 'H':   cout &lt;&lt; "The capitalized string is: "  &lt;&lt; endl;
                              capital(cstring);
                              cout &lt;&lt; cstring &lt;&lt; endl;
                       break;                     
           case 'I':   cin.get();
                       cout &lt;&lt; "Enter a C-string of at most 1024 characters: ";
                       cin.getline(cstring, SIZE);
                       break; 
              case 'Q':       cout &lt;&lt; "Goodbye!\n";
                       exit(EXIT_SUCCESS);
        }
     } while (toupper(choice) != 'Q');
  
      return 0;}
  </code></pre>
  
  <p>My header file:</p>
  
  <pre><code>    #ifndef STRING_COUNT
      #define STRING_COUNT
  
      #include &lt;iostream&gt;
      #include &lt;cstdlib&gt;
  
      double wordCount(char *[]);
      void capital(char *[]);
      int vowel(char *[]);
      int consonant(char *[]);
      int upper(char *[]);
      int lower(char *[]);
      int alphabet(char *[]);
      int digit(char *[]);
  
      #endif
  </code></pre>
  
  <p>My implementation file:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;cstring&gt;
  #include "stringCount.h"
  
  double wordCount(char*words)
  {
      int a, size, word=0 ;
  
      size = sizeof (words);
  
      for (a=0 ; a &lt; size ; a++)
      {
           if (isspace(words[a]))
           {
              word++;
           }
      }
      return word+1;
  }
  //======================================================================
  void capital(char * words)
  {
      int i,  size ;
  
      size = sizeof (words);
  
  
      for (i=0 ; i &lt; size ; i++)
      {
          if (isspace(words[i])&amp;&amp; isalpha(words[i+1]) )
          {
              words[i+1] = toupper(words[i+1]);
              i++;
          }
      }
  }
  //=====================================================================
  int vowel(char * words)
  {
      int a =0;
      int size, vowels=0 ;
      size =  sizeof(words);   
  
      for (a=0; a&lt; size;  a++)
  
      {
          if( words[a]== 'a'|| words[a] == 'e' || words[a]== 'i' || words[a] == 'o' || words[a] == 'u' ||words[a]== 'A'|| words[a] == 'E' || words[a]== 'I' || words[a] == 'O' || words[a] == 'U')
          {
              vowels++;
          } 
      }
      return vowels;
  }
  //=====================================================================
  int consonant(char * words)
  {
      int i,  size,  cons =0;  
      size = sizeof(words);
  
        for (i = 0; i&lt; size ; i++)
        {
          if (isalpha(words[i])&amp;!( words[i]== 'a'|| words[i] == 'e' || words[i]== 'i' || words[i] == 'o' || words[i] == 'u' ||words[i]== 'A'|| words[i] == 'E' || words[i]== 'I' || words[i] == 'O' || words[i] == 'U'))
          {
              cons++ ;
          }
  
        } ;
  
  
       return cons; 
  }
  //====================================================================
  int upper(char * words)
  {
  
       int i,  size,  uppercase =0 ;
  
       size = sizeof(words);
       for (i = 0 ; i&lt; size ; i++)
       {
          if (isupper(words[i]))
          {
              uppercase++;
          }
       }
  
       return uppercase;
  
  }
  //===============================================================
  int lower(char * words)
  {
  
       int i,  size,  lowercase =0 ;
  
       size = sizeof(words);
       for (i = 0 ; i&lt; size ; i++)
       {
          if (islower(words[i]))
          {
              lowercase++;
          }
       }
  
       return lowercase;
  
  }
  //================================================================
  int alphabet(char * words)
  {
      int alphab =0;
  
      int i,  size;    
      size = sizeof(words);
  
        for (i = 0; i&lt; size ; i++)
        {
          if (isalpha(words[i]))
          {
              alphab++ ;
          }
  
        }
      return alphab;
  }
  //=================================================================
  int digit(char * words)
  {
      int a,  size,  digi =0;
      size = sizeof(words);
  
      for (a=0 ; a &lt; size ; a++)
      {
          if(isdigit(words[a]))
          {
              digi ++;
          }
      }
      return digi ;   
  }
  //=====================================================================
  </code></pre>