title: C++: Appending to a vector string
body: <p>I'm writing a &quot;pig latin&quot; program; read input from the users (first name and last name,) make the input lowercase and change the name depending upon what was in the name.
  If the first letter (of both the first and last name) was a vowel, we're supposed to add &quot;way&quot; to the end of it.</p>
  <p>If the first letter was a consonant, we were to take the first letter, move it to the end of the string and add &quot;ay&quot; to the end of it.</p>
  <p>My code has been giving me errors when trying to add text to the end of the string. It says it can't convert the string to a character, and I'm not exactly sure what that means.
  It also says I can't use the output operand &lt;&lt; for strings, even though I've used it before.</p>
  <p>The errors occur with &quot;strcpy&quot; and the final code where I output the names.</p>
  <blockquote>
  <p>37: error: cannot convert <code>'std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;'</code> to <code>'char*'</code> for argument <code>'1'</code> to <code>'char* strcpy(char*, const char*)'</code></p>
  <p>47: error: cannot convert <code>'std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;'</code> to <code>'char*'</code> for argument <code>'1'</code> to <code>'char* strcpy(char*, const char*)'</code></p>
  <p>54: error: no match for <code>'operator&lt;&lt;'</code> in <code>'std::cout &lt;&lt; first'</code></p>
  </blockquote>
  <p>I just need some help fixing the errors and seeing where I went wrong. The full code is included.</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;cstring&gt;
  #include &lt;string&gt;
  using namespace std;
  int main()
  {
      int q, s;
      char shea[] = &quot;way&quot;;
      char gavin_stop_looking_at_ponies[] = &quot;ay&quot;;
      vector &lt;string&gt; first;
      vector &lt;string&gt; last;
      cout &lt;&lt; &quot;Please enter your first name.&quot; &lt;&lt; endl;
      for (int i = 0; i &lt; first.size(); i++)
      {
          getline (cin, first[i]);
          string nfirst = first[i];
          while (nfirst[q])
          {
              nfirst[q] = tolower(nfirst[q]);
          }
          first[i] = nfirst;
      }
      cout &lt;&lt; &quot;Please enter your last name.&quot; &lt;&lt; endl;
      for (int j = 0; j &lt; last.size(); j++)
      {
          getline (cin, last[j]);
          string nlast = last[j];
          while (nlast[s])
          {
              nlast[s] = tolower(nlast[s]);
          }
          last[j] = nlast;
          }
      if ( (first[0] == &quot;a&quot;) ||( first [0] == &quot;e&quot;) || (first [0] == &quot;i&quot;) || (first [0] == &quot;o&quot;)     || (first [0] == &quot;u&quot;))
      {
          strcpy (first, &quot;way&quot;);
      }
      else
      {
          first[first.size()] = first[0] + &quot;ay&quot;;
      }
      
      if ( (last[0] == &quot;a&quot;) ||( last [0] == &quot;e&quot;) || (last [0] == &quot;i&quot;) || (last [0] == &quot;o&quot;) || (last [0] == &quot;u&quot;))
      {
          strcpy (last, &quot;way&quot;);
      }
      else
      {
          last[last.size()] = last[0] + &quot;ay&quot;;
      }
      cout &lt;&lt; first &lt;&lt; last &lt;&lt; endl;
      return 0;
  }
  </code></pre>