title: getline not asking for input?
body: <p>This is probably a very simple problem but forgive me as I am new.
  Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  using namespace std;
  
  int main ()
  { 
     string name;
     int i;
     string mystr;
     float price = 0;
  
     cout &lt;&lt; "Hello World!" &lt;&lt; endl;
     cout &lt;&lt; "What is your name? ";
     cin &gt;&gt; name;
     cout &lt;&lt; "Hello " &lt;&lt; name &lt;&lt; endl;
     cout &lt;&lt; "How old are you? ";
     cin &gt;&gt; i;
     cout &lt;&lt; "Wow " &lt;&lt; i &lt;&lt; endl;
  
     cout &lt;&lt; "How much is that jacket? ";
     getline (cin,mystr);
     stringstream(mystr) &gt;&gt; price;
     cout &lt;&lt; price &lt;&lt; endl;
     system("pause");
  
     return 0;
  }
  </code></pre>
  
  <p>The problem is that when asked <code>how much is that jacket?</code> getline does not ask the user for input and just inputs the initial value of "0". Why is this?</p>