title: Getline and EOF
body: <p>I am trying to read a file. The file contents have a newline between words in a sentence and two newlines between sentence. I can only read one sentence. I have tried to put a EOF as a delimiter in getline but it seems not to work. Does anyone have any suggestions on how to resolve this?     </p>
  
  <p>The file contents are:</p>
  
  <blockquote>
    <p>County</p>
    
    <p>Grand </p>
    
    <p>Jury</p>
    
    <p>said   Friday   an   investigation  of   Atlanta's  recent   primary<br>
    election  produced   `` .  no   evidence   '' .  that   any<br>
    irregularities   took   place   . .   The  jury  further   said   in<br>
    term-end   presentments   that  the   City   Executive   Committee </p>
    
    <p>But what's get printed is:</p>
    
    <p>County </p>
    
    <p>Grand   Jury   said   Friday   an  investigation  of   Atlanta's<br>
    recent   primary   election  produced  `` . no   evidence   '' . that 
    any   irregularities  took   place
    . . </p>
  </blockquote>
  
  <pre><code>string line;
  string a, b;
  ifstream infile("myFile");
  
   while (getline(infile, line))
  {
      istringstream iss(line);
  
      if (!(iss &gt;&gt; a &gt;&gt; b)) { break; } // error
  
      cout &lt;&lt; a &lt;&lt; b &lt;&lt; endl;
  }
  </code></pre>