title: mixing cin and getline input issues
body: <p>Im doing exercices from c++ primer, and trying to do a program that recieves as input a word and a line. If when i ask for a word (with cin) I press enter, then the program just skips the next lines and doest ask for a line (with the getline)... and if i write an entire phrase in the cin (like "hello beautifull world") then the first word ("hello") is captured by the cin and the others two words ("beautifull world") by the getline.</p>
  
  <p>i understand that in the cin, when i input a space, it cuts the input. what i dont uderstand are two things:</p>
  
  <p>1.- why if i end the input (in the cin) with enter it skips all the rest of code? (is there a solution for that?)</p>
  
  <p>2.- why if i write an entire phrase in the cin, it assign the other two word to the getline before to execute the 
      cout &lt;&lt; "enter a line" &lt;&lt; endl;
  ?</p>
  
  <p>Thx! sorry for my english C:</p>
  
  <pre><code> #include &lt;iostream&gt;
   #include &lt;string&gt;
   using namespace std;
  
   int main() {
  
  string word, line;
  
  cout &lt;&lt; "enter a word" &lt;&lt; endl;
  cin &gt;&gt; word;
  
  cout &lt;&lt; "enter a line" &lt;&lt; endl;
  getline(cin, line);
  
  cout &lt;&lt; "your word is " &lt;&lt; word &lt;&lt; endl;
  cout &lt;&lt; "your line is " &lt;&lt; line &lt;&lt; endl;
  
  return 0;
  }
  </code></pre>