title: C++ no cout info displayed
body: <p>I was trying to traverse and output the vector, but there is nothing happened other than asking me for input. </p>
  
  <pre><code>int main() {
      string a;
  
      vector&lt;string&gt; test;
      while (std::cin&gt;&gt;a) {
          test.push_back(a);
      }
      for (vector&lt;string&gt;::iterator i= test.begin(); i!= test.end(); ++i) {
          std::cout &lt;&lt; *i &lt;&lt; std::endl;
      }
      system("pause");
      return 0;
  }
  </code></pre>