title: Removing vowels and special characters while captilizing consonants using recursion only in C++
body: <p>I'm trying to write a recursive function that deletes vowels, special characters, and spaces from a phrase and capitalizes the consonants. I'm having trouble thinking up a purely recursive function. Also not sure how to chain functions in C++. Is it possible to use <code>toUpperCase()</code> and <code>isalpha()</code> together? Is there a way to combine the two conditions in the <code>else if</code> clauses and place them in the <code>else</code> clause?</p>
  
  <pre><code>bool isVowel(char ch) {
  
          if (ch == 'A' || ch == 'E' || ch == 'I' ||
              ch == 'O' || ch == 'U' || ch == 'Y') {
          return true;
      }
          else {
          return false;
      }
  }
  
  string onlyConnectize(string phrase) {        
  
          phrase = toUpperCase(phrase);
  
          // base case
          if (phrase.empty()) {
          return "";
      }
          else if (!isalpha(phrase[0])) {
          return "";
      }
          else if (isVowel(phrase[0])) {
          return "";
      }
          else {
          return phrase[0] + onlyConnectize(phrase.substr(1));
      }
  }
  </code></pre>