title: C++ can't get user input for strtok
body: <p>I keep running into an issue with this code in C++:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main ()
  {
     string words[25];
     int i = 0;
     char * word;
     cout &lt;&lt; "Input a phrase, no capital letters please.";
     char phrase[100] = "this is a phrase";
     word = strtok (phrase, " ,.");
  
     while (word != NULL)
     {
        i++;
        words[i] = word;
        cout &lt;&lt; words[i] &lt;&lt; " ";
        word = strtok (NULL, " ,.-");
        int g = 0;
     }
     cout &lt;&lt; endl &lt;&lt; endl;
  
     int g = 0;
     while (g &lt; i)
     {
        g++;
        char f = words[g].at(0);
        if ((f == 'a') || (f == 'e') || (f == 'i') || (f == 'o') || (f == 'u') || (f == 'y'))
        {
           words[g].append("way");
           cout &lt;&lt; words[g] &lt;&lt; " ";
        }
        else
        {
           words[g].erase (0,1);
           cout &lt;&lt; words[g] &lt;&lt; f &lt;&lt; "ay" &lt;&lt; " ";
        }
  
     }
     cout &lt;&lt; endl;
     system("PAUSE");
  }
  </code></pre>
  
  <p>I actually want my program user to generate the phrase to be put in char phrase[100] but I can't figure out the proper syntax to initiate input on it without screwing up the translation. </p>
  
  <p>This is a program that translates phrases into pig latin BTW. </p>