title: Ignoring whitespaces/tabs/newlines with getline()
body: <p>I went through lot of the resources on web but still not able to get this. I didn't understand how 
  std::skipws works to ignore whitespaces , tabs and newlines.</p>
  
  <p>Following is my simple code</p>
  
  <pre><code>vector&lt;string&gt; vec;
  while(1){
  
      getline(cin, s); 
  
      if( s.compare("#") == 0)
          break;
      else
          vec.push_back(s);
  }   
  </code></pre>
  
  <p>I will enter a line of strings with newlines, whitespaces and tabs. After input I want to store strings into the vector and that will stop when "#" string is encountered. I tried with the above code but it store spaces along with the strings in the vector though it terminates after enterting "#". </p>