title: How to Determine if a Character Is a Vowel
body: <p>I am trying to get use <code>vector[].substr()</code> but i don't know if this is possible. Does anyone know another way to do this?  My goal is to take a word that is in vector and separate it from the first vowel. any help is appreciated. my code looks like : </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "derrick_math.h"
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  #include &lt;vector&gt;
  #include &lt;cctype&gt;
  #include &lt;algorithm&gt;
  using namespace std;
  
  int main()
  {
      string phrase;
      string ay = "ay";
      vector&lt;string&gt; vec;
      cout &lt;&lt; "Please enter the word or phrase to translate: ";
      getline(cin, phrase);
  
      istringstream iss(phrase);
      copy(istream_iterator&lt;string&gt;(iss), 
           istream_iterator&lt;string&gt;(), 
           back_inserter(vec));
      for (int i = 0; i &lt; vec.size(); i++)
      {
          if (vec[i].substr(0, 1) == "a || e || i || o || u || A || E || I || O || U")
      {
          cout &lt;&lt; vec[i] &lt;&lt; "ay";
      }
      if (vec[i].substr(1, 1) == "a || e || i || o || u || A || E || I || O || U")
      {
          cout &lt;&lt; vec[i].substr(2) &lt;&lt; vec[i].substr(0, 1) &lt;&lt; "ay";
      }
      if (vec[i].substr(2, 1) == "a || e || i || o || u || A || E || I || O || U")
      {
          cout &lt;&lt; vec[i].substr(3), vec[i].substr(0, 2) + "ay";
      }
      if (vec[i].substr(3, 1) == "a || e || i || o || u || A || E || I || O || U")
      {
          cout &lt;&lt; vec[i].substr(4), vec[i].substr(0, 3) + ay;
      }
      cout &lt;&lt; vec[i] &lt;&lt; " ";
      }
      cout &lt;&lt; endl;
      system("pause");
      return 0;
  </code></pre>