title: How to read a multiple line input from command line in c or C++?
body: <p>For Example: 
  If I need to read a multiple line input like(and I dont know How many lines would be there!!):</p>
  
  <p>1 20 </p>
  
  <p>2 31</p>
  
  <p>3 41</p>
  
  <p>I am using something like </p>
  
  <pre><code>int main()
  {
    string line;
  
    while(getline(cin,line) != NULL)
    {
         // some code
         // some code    
    }
  
  
  }
  </code></pre>
  
  <p>Now the program never stops- i.e always it expects some input. How do i beak the loop when there are no more input lines ?</p>