title: How to fix "Variable declaration in condition must have an initializer"
body: <p>I am writing a program that counts the number of vowels that the user inputs but it is giving me the error "Variable declaration in condition must have an initializer". How do you fix it?</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int isVowel(char c) 
  {
    char Vowels[] = {'A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u'};
    if (c in Vowels)
      return true;
  }
  
  int main()
  {
    int n;
    int numVowel = 0;
    char c;
  
    cin &gt;&gt; n;
  
    for (int i = 0; i &lt; n; ++i)
    {
      cin &gt;&gt; c;
      if (isVowel(c))
        numVowel++;
    }
  
    cout &lt;&lt; "Number of vowels = " &lt;&lt; numVowel &lt;&lt; endl;
  
    return 0;
  }
  </code></pre>