title: getline not working properly ? What could be the reasons?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6642865/getline-not-asking-for-input">getline not asking for input?</a>  </p>
  </blockquote>
  
  
  
  <p>There is some unique thing happening in my program.
  Here are some set of commands :</p>
  
  <pre><code> cout &lt;&lt; "Enter the full name of student: ";  // cin name
   getline( cin , fullName );
  
   cout &lt;&lt; "\nAge: ";  // cin age
   int age;
   cin &gt;&gt; age ;
  
  cout &lt;&lt; "\nFather's Name: ";  // cin father name
  getline( cin , fatherName );
  
  cout &lt;&lt; "\nPermanent Address: ";  // cin permanent address
  getline( cin , permanentAddress );
  </code></pre>
  
  <p>When i try to run this snippet along with the whole code.The output program works like :</p>
  
  <p><img src="https://i.stack.imgur.com/tM3mU.jpg" alt="enter image description here"></p>
  
  <h2>output:</h2>
  
  <pre><code>Enter the full name of student:
  Age: 20
  
  Father's Name:
  Permanent Address: xyz
  </code></pre>
  
  <p>If you notice ,the program didn't ask me the full name and went on directly to ask me the age.Then it skips the father's name also and asks the permanent address.
  <strong>What could be the reason for this ?</strong></p>
  
  <p>It is difficult for me to post the whole code because it is too large.</p>