title: istream loop makes the program jump over cin statement
body: <p>Here is a program that takes a sequence of space-separated numbers and stores then in a vector. The problem is when putting the <code>cin</code> loop before the input of <code>x0</code>, the program jumps the next <code>cin</code> statement, but the reverse is working very normally.</p>
  <p>Can you explain to me what I am missing here?</p>
  <p>State of jump:</p>
  <pre><code>vector&lt;int&gt; V{};
  int x0{}, temp{};
          
  cout &lt;&lt; &quot;Enter sequence\n&quot;;
  for(temp;cin&gt;&gt;temp;)
  {
      if (!isalpha(temp)) V.push_back(temp);
      else
      {
          cin.clear();
          break;
      }
  }
  cout&lt;&lt;&quot;enter x0 : &quot;;
  cin &gt;&gt; x0;// the program skips this!
  </code></pre>
  <p>The working reverse:</p>
  <pre><code>vector&lt;int&gt; V{};
  int x0{}, temp{};
  cout&lt;&lt;&quot;enter x0 : &quot;;
  cin &gt;&gt; x0;
  cout &lt;&lt; &quot;Enter sequence\n&quot;;
  for(temp;cin&gt;&gt;temp;)
  {
      if (!isalpha(temp)) V.push_back(temp);
      else
      {
          cin.clear();
          break;
      }
  }
  </code></pre>