Run Time Error: Program skipping prompt for second and third names
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3731529/program-is-skipping-over-getline-without-taking-user-input">Program is skipping over Getline() without taking user input</a>  </p>
</blockquote>



<p>Alright, so I have a program that is running and at the start it prompts you for the data  fill the data members. The program does this for 3 different objects.</p>

<p>My problem is that, at run time, after inputting data for the fist object the program proceeds to skip input for the second name and goes straight to the next option. It does the same thing for the third option's name. It also does this when you get the chance to change the data. </p>

<blockquote>
  <p>"Enter CD Name: Microsoft Word</p>
  
  <p>1-Game</p>
  
  <p>2-Word</p>
  
  <p>3-Compiler</p>
  
  <p>4-Spreadsheet</p>
  
  <p>5-Dbase</p>
  
  <p>6-Presentation</p>
  
  <p>Enter the number that corresponds with the CD's Type: 2</p>
  
  <p>Input CD Cost: 15.23</p>
  
  <p>Enter CD Name: 1-Game &lt;- ((Skips the input part and takes you directly to the menu!))</p>
  
  <p>2-Word</p>
  
  <p>3-Compiler</p>
  
  <p>4-Spreadsheet</p>
  
  <p>5-Dbase</p>
  
  <p>6-Presentation</p>
  
  <p>Enter the number that corresponds with the CD's Type:"</p>
</blockquote>

<p>The issue is most likely in my member function, but I'm not sure what the issue is.</p>

<p>Here's my member function code:</p>

<pre><code>void CDX::LoadInfo() //Prompts, validates and sets data members
{
cout &lt;&lt; "Enter CD Name: ";
getline(cin, Name);

int choice=0;
do
{   cout &lt;&lt; "1-Game\n2-Word\n3-Compiler\n4-Spreadsheet\n5-Dbase\n6-Presentation" &lt;&lt; endl;
    cout &lt;&lt; "Enter the number that corresponds with the CD's Type: ";
    cin &gt;&gt; choice;
} while ((choice &lt;1)||(choice&gt;6));

switch(choice)
//Code for case-switch statement goes here)
</code></pre>

<p>So what am I missing? Is this a buffer issue or am I prematurely ending the code in some way that causes it to skip?</p>
