title: C++ Debug Assertation Failed: "String is not null terminated"
body: <p>Me and a friend are trying to solve <a href="http://www.reddit.com/r/dailyprogrammer/comments/1ystvb/022414_challenge_149_easy_disemvoweler/" rel="nofollow">this</a> problem to practice programming. We've solved it, but it only actually works on his computer, which is running ubuntu.  He's using gedit to compile.  The solution we came up with is:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
  char input[999], sentence[999];
  
  cout &lt;&lt; "Enter a sentence in all lower case with no punctuation." &lt;&lt; endl;
  
  cin.getline(input, 999);
  strcat(sentence, input);
  
  for(int x=0; input[x] != 0; x++)
  {
          if (!(input[x] == 'a' || input[x] == 'e' || input[x] == 'i' || input[x] == 'o' || input[x] == 'u' || input[x] == ' '))
          {
              cout &lt;&lt; input [x];
          }
  }
      cout &lt;&lt; endl;
  
      for(int x=0; input[x] != 0; x++)
      {
              if (input[x] == 'a' || input[x] == 'e' || input[x] == 'i' || input[x] == 'o' || input[x]         == 'u')
              {
              cout &lt;&lt; input[x];
              }
      }       
      cout &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>It runs successfully on his computer, but I'm using visual studio 12 and I get a <strong><code>debug assertion error</code></strong>.  It states that </p>
  
  <pre><code>Expression: (L"String is not null terminated"&amp;&amp;0).  
  </code></pre>
  
  <p>Any reason why I'm getting this error and he is not?</p>